Hello! Please can someone tell me what is wrong with this value/decal script please?
Thanks!
It doesn't switch images when a value is set. Please help me fix this problem!
Thanks!
Images:
http://oi58.tinypic.com/20s9co9.jpg http://oi61.tinypic.com/ajnuhl.jpg http://oi58.tinypic.com/9sdz5u.jpg
A script:
screen = script.Parent.Decal while true do wait() if game.Workspace.A.Zig.Value == false then screen.Texture = "http://www.roblox.com/asset/?id=162925348" else if game.Workspace.A.Zig.Value == true then screen.Texture = "http://www.roblox.com/asset/?id=162925339" end end end
The condition in the if
is not necessary since the value can only either be true
or false
.
(Note that this isn't an error, it just makes your code cleaner)
while true do wait() if game.Workspace.A.Zig.Value == false then screen.Texture = "http://www.roblox.com/asset/?id=162925348" else screen.Texture = "http://www.roblox.com/asset/?id=162925339" end end
According to the picture of the explorer you posted, Zig
should be B
(or you need to rename 'B' to 'Zig'). This is the source of your error.
Note that if you consult the output, you would be given such hints (that also help other us debug if you're stuck)