This script is suppose to check the value of something when its changed, and change the texture of a decal depending on the number after the value was changed. If this makes any sense and you can help me, here is the code. Nothing shows up in the output.
-- Made by AwsomeSpongebob
Face = script.Parent.Face.Texture
FaceValue = script.Parent.Value
FaceVal = FaceValue.Value
FaceValue.Changed:connect(function()
if FaceVal == 0 then
Face = ("rbxasset://textures/face.png")
elseif FaceVal == 1 then
Face = ("http://www.roblox.com/asset/?id=26434948")
elseif FaceVal == 2 then
Face = ("http://www.roblox.com/asset/?id=13079565")
elseif FaceVal == 3 then
Face = ("http://www.roblox.com/asset/?id=29291814")
elseif FaceVal == 4 then
Face = ("http://www.roblox.com/asset/?id=69252500")
elseif FaceVal == 5 then
Face = ("http://www.roblox.com/asset/?id=25553966")
elseif FaceVal == 6 then
Face = ("http://www.roblox.com/asset/?id=28440649")
elseif FaceVal == 7 then
Face = ("http://www.roblox.com/asset/?id=21439548")
elseif FaceVal == 8 then
Face = ("http://www.roblox.com/asset/?id=69714134")
elseif FaceVal == 9 then
Face = ("http://www.roblox.com/asset/?id=149124698")
elseif FaceVal == 10 then
Face = ("http://www.roblox.com/asset/?id=31142001")
elseif FaceVal == 11 then
Face = ("http://www.roblox.com/asset/?id=112805849")
end
end)

4 comments
Thanks!But why use WaitForChild instead of just telling it where it is?
Like using script.parent.value?
The value might not have loaded when you try to find it!
Oh ok. Thanks! :D