my guess is that it's a local script so it cant change/read the values and run an if statement here's the error: pause_and_play_value is not a valid member of ServerStorage|code:
function pause()
if game.ServerStorage.pause_and_play_value.Value == "playing" then
game.ServerStorage.pause_and_play_value.Value = "paused"
while game.ServerStorage.pause_and_play_value.Value == "paused" do
wait (0.1)
workspace.MusicScript.S1:Pause()
workspace.MusicScript.S2:Pause()
workspace.MusicScript.S3:Pause()
workspace.MusicScript.S4:Pause()
workspace.MusicScript.S5:Pause()
script.Parent.Image = 'http://www.roblox.com/asset/?id=5167333273'
end
end
if game.ServerStorage.pause_and_play_value.Value == "paused" then
end
end
script.Parent.MouseButton1Click:Connect(pause)

1 comment
oops..sorry