От тех кто разбирается в роблокс студио
У меня возникает ошибка:
Unable to assign property TextColor3. Color3 expected, got table
Вот код: local replicatedStorage = game:GetService("ReplicatedStorage"
local remotes = replicatedStorage:WaitForChild("Remotes"
local tweenService = game:GetService("TweenService"
local info = TweenInfo.new(.2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
local function animateText(text1,text2,rolledNumber)
local rolledNumber = remotes.RollFunction:InvokeServer()
text1.Position = UDim2.fromScale(.5, .35)
text1.TextColor3 = rolledNumber[3]
text1.Text = rolledNumber[1]
text2.Text =`1 in {tostring(rolledNumber[2])}`
tweenService:Create(text1, info, {Position = UDim2.fromScale(.5, .5)})
lay()
wait(.2)
end
return {
rollAnimation = function(animationFolder: fold, rolledNumber)
local background = animationFolder:WaitForChild("Background"
local title = animationFolder:WaitForChild("Title"
background.Visible = true
title.Visible = true
for i, Table in ipairs(rolledNumber) do
animateText(title,y, Table)
end
wait(1)
background.Visible = false
title.Visible = false
end,
} Вот код с редкостями: return {
{"Common", 3, Color3.fromRGB(53, 151, 255)};
{"Rare", 5, Color3.fromRGB(133, 255, 245)};
{"Epic", 10, Color3.fromRGB(169, 94, 255)};
} Очень благодарен тем кто поможет!
У меня возникает ошибка:
Unable to assign property TextColor3. Color3 expected, got table
Вот код: local replicatedStorage = game:GetService("ReplicatedStorage"
local remotes = replicatedStorage:WaitForChild("Remotes"
local tweenService = game:GetService("TweenService"
local info = TweenInfo.new(.2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
local function animateText(text1,text2,rolledNumber)
local rolledNumber = remotes.RollFunction:InvokeServer()
text1.Position = UDim2.fromScale(.5, .35)
text1.TextColor3 = rolledNumber[3]
text1.Text = rolledNumber[1]
text2.Text =`1 in {tostring(rolledNumber[2])}`
tweenService:Create(text1, info, {Position = UDim2.fromScale(.5, .5)})
wait(.2)
end
return {
rollAnimation = function(animationFolder: fold, rolledNumber)
local background = animationFolder:WaitForChild("Background"
local title = animationFolder:WaitForChild("Title"
background.Visible = true
title.Visible = true
for i, Table in ipairs(rolledNumber) do
animateText(title,y, Table)
end
wait(1)
background.Visible = false
title.Visible = false
end,
} Вот код с редкостями: return {
{"Common", 3, Color3.fromRGB(53, 151, 255)};
{"Rare", 5, Color3.fromRGB(133, 255, 245)};
{"Epic", 10, Color3.fromRGB(169, 94, 255)};
} Очень благодарен тем кто поможет!