Ok so I have like an RNG thing that rolls different objects but the decal wont load for it.
Here’s the script:
local event = game:GetService("ReplicatedStorage"):WaitForChild("Roll")
local mainframe = script.Parent
local imagerolled = mainframe:WaitForChild("RolledImage")
local textrolled = mainframe:WaitForChild("RolledText")
local rollscreen = mainframe.Parent
local outsidescreen = rollscreen.Parent:WaitForChild("Outside Screen")
local images = rollscreen:WaitForChild("Images")
local colorValues = {
['Sosa'] = Color3.new(0.552941, 0.552941, 0.552941),
['Kanye'] = Color3.new(0.847059, 0, 0),
['Tecca'] = Color3.new(0, 0.796078, 0),
['Kendrick'] = Color3.new(0, 0, 1),
['Drake'] = Color3.new(0.819608, 0.819608, 0)
}
event.Event:Connect(function(chosen)
outsidescreen.Enabled = false
rollscreen.Enabled = true
for i = 1, 10 do
local chosenroll = chosen[i]
local chosenid = images:FindFirstChild(chosenroll).Value
print(chosenid) -- prints out the right id
imagerolled.Image = 'rbxassetid://' .. chosenid -- problem :(
print(imagerolled.Image) -- prints out the right id
textrolled.Text = tostring(chosenroll)
textrolled.TextColor3 = colorValues[chosenroll]
task.wait(1.5)
end
task.wait(5)
outsidescreen.Enabled = true
rollscreen.Enabled = false
end)
Help is appreciated.