FirstImage = "http://www.roblox.com/asset?id=2967292661" SecondImage = "http://www.roblox.com/asset?id=2967293159" ThirdImage = "http://www.roblox.com/asset/?id=2972903107" if game.ReplicatedStorage.CheckIn1.Value == false then while true do game.Workspace.CheckIn1.SurfaceGui.ImageLabel.Image = FirstImage wait(4) game.Workspace.CheckIn1.SurfaceGui.ImageLabel.Image = SecondImage wait(4) end elseif game.ReplicatedStorage.CheckIn1.Value == true then while true do game.Workspace.CheckIn1.SurfaceGui.ImageLabel.Image = FirstImage wait(4) game.Workspace.CheckIn1.SurfaceGui.ImageLabel.Image = ThirdImage wait(7) end end
I am trying to make it so if I sees the value changes it changes the script
You probably intended to have the loop outside the conditional, so that it's checked periodically, no? Like this:
FirstImage = "http://www.roblox.com/asset?id=2967292661" SecondImage = "http://www.roblox.com/asset?id=2967293159" ThirdImage = "http://www.roblox.com/asset/?id=2972903107" while true do if game.ReplicatedStorage.CheckIn1.Value == false then game.Workspace.CheckIn1.SurfaceGui.ImageLabel.Image = FirstImage wait(4) game.Workspace.CheckIn1.SurfaceGui.ImageLabel.Image = SecondImage wait(4) elseif game.ReplicatedStorage.CheckIn1.Value == true then game.Workspace.CheckIn1.SurfaceGui.ImageLabel.Image = FirstImage wait(4) game.Workspace.CheckIn1.SurfaceGui.ImageLabel.Image = ThirdImage wait(7) end wait() end
BUT, just FYI...
Value object changes don't replicate from client to server, so if this is a server script, the only way you can change the Value of CheckIn1 for everyone to see is from a server script or the developer console command line (F9 console). If you set it from a LocalScript, only that player's client will see things change. I mention this because having your ValueObject in ReplicatedStorage suggests you might be trying to use it to replicate a change from client to server, which will not work. You need a RemoteEvent or RemoteFunction to set it from a client and have it change on the server.