I've been creating an intermission script for my game and it will only work in studio play mode. It will not work with Studio Test mode or Online Play mode.
I have tried many things to try fix it but in the end, none of it ever worked. Also, I made sure filtering enabled is off so that will not effect the script. The other thing i have tried to do is change the script into a local script.
Here is the code i am using:
wait(1.2)
if game.Players.LocalPlayer.Value.Value == 0 then
script.Parent.Frame.Visible = true
end
if game.Workspace.Settings.Intermission.Value == 30 then
wait(1)
game.Workspace.Settings.Intermission.Value = 29
script.Parent.Frame.IntermissionNumber.Text = "29"
end
if game.Workspace.Settings.Intermission.Value == 29 then
wait(1)
game.Workspace.Settings.Intermission.Value = 28
script.Parent.Frame.IntermissionNumber.Text = "28"
end
if game.Workspace.Settings.Intermission.Value == 28 then
wait(1)
game.Workspace.Settings.Intermission.Value = 27
script.Parent.Frame.IntermissionNumber.Text = "27"
end
if game.Workspace.Settings.Intermission.Value == 27 then
wait(1)
game.Workspace.Settings.Intermission.Value = 26
script.Parent.Frame.IntermissionNumber.Text = "26"
end
if game.Workspace.Settings.Intermission.Value == 26 then
wait(1)
game.Workspace.Settings.Intermission.Value = 25
script.Parent.Frame.IntermissionNumber.Text = "25"
end
if game.Workspace.Settings.Intermission.Value == 25 then
wait(1)
game.Workspace.Settings.Intermission.Value = 24
script.Parent.Frame.IntermissionNumber.Text = "24"
end
if game.Workspace.Settings.Intermission.Value == 24 then
wait(1)
game.Workspace.Settings.Intermission.Value = 23
script.Parent.Frame.IntermissionNumber.Text = "23"
end
if game.Workspace.Settings.Intermission.Value == 23 then
wait(1)
game.Workspace.Settings.Intermission.Value = 22
script.Parent.Frame.IntermissionNumber.Text = "22"
end
if game.Workspace.Settings.Intermission.Value == 22 then
wait(1)
game.Workspace.Settings.Intermission.Value = 21
script.Parent.Frame.IntermissionNumber.Text = "21"
end
if game.Workspace.Settings.Intermission.Value == 21 then
wait(1)
game.Workspace.Settings.Intermission.Value = 20
script.Parent.Frame.IntermissionNumber.Text = "20"
end
if game.Workspace.Settings.Intermission.Value == 20 then
wait(1)
game.Workspace.Settings.Intermission.Value = 19
script.Parent.Frame.IntermissionNumber.Text = "19"
end
if game.Workspace.Settings.Intermission.Value == 19 then
wait(1)
game.Workspace.Settings.Intermission.Value = 18
script.Parent.Frame.IntermissionNumber.Text = "18"
end
if game.Workspace.Settings.Intermission.Value == 18 then
wait(1)
game.Workspace.Settings.Intermission.Value = 17
script.Parent.Frame.IntermissionNumber.Text = "17"
end
if game.Workspace.Settings.Intermission.Value == 17 then
wait(1)
game.Workspace.Settings.Intermission.Value = 16
script.Parent.Frame.IntermissionNumber.Text = "16"
end
if game.Workspace.Settings.Intermission.Value == 16 then
wait(1)
game.Workspace.Settings.Intermission.Value = 15
script.Parent.Frame.IntermissionNumber.Text = "15"
end
if game.Workspace.Settings.Intermission.Value == 15 then
wait(1)
game.Workspace.Settings.Intermission.Value = 14
script.Parent.Frame.IntermissionNumber.Text = "14"
end
if game.Workspace.Settings.Intermission.Value == 14 then
wait(1)
game.Workspace.Settings.Intermission.Value = 13
script.Parent.Frame.IntermissionNumber.Text = "13"
end
if game.Workspace.Settings.Intermission.Value == 13 then
wait(1)
game.Workspace.Settings.Intermission.Value = 12
script.Parent.Frame.IntermissionNumber.Text = "12"
end
if game.Workspace.Settings.Intermission.Value == 13 then
wait(1)
game.Workspace.Settings.Intermission.Value = 12
script.Parent.Frame.IntermissionNumber.Text = "12"
end
if game.Workspace.Settings.Intermission.Value == 12 then
wait(1)
game.Workspace.Settings.Intermission.Value = 11
script.Parent.Frame.IntermissionNumber.Text = "11"
end
if game.Workspace.Settings.Intermission.Value == 11 then
wait(1)
game.Workspace.Settings.Intermission.Value = 10
script.Parent.Frame.IntermissionNumber.Text = "10"
end
if game.Workspace.Settings.Intermission.Value == 10 then
wait(1)
game.Workspace.Settings.Intermission.Value = 9
script.Parent.Frame.IntermissionNumber.Text = "9"
end
if game.Workspace.Settings.Intermission.Value == 9 then
wait(1)
game.Workspace.Settings.Intermission.Value = 8
script.Parent.Frame.IntermissionNumber.Text = "8"
end
if game.Workspace.Settings.Intermission.Value == 8 then
wait(1)
game.Workspace.Settings.Intermission.Value = 7
script.Parent.Frame.IntermissionNumber.Text = "7"
end
if game.Workspace.Settings.Intermission.Value == 7 then
wait(1)
game.Workspace.Settings.Intermission.Value = 6
script.Parent.Frame.IntermissionNumber.Text = "6"
end
if game.Workspace.Settings.Intermission.Value == 6 then
wait(1)
game.Workspace.Settings.Intermission.Value = 5
script.Parent.Frame.IntermissionNumber.Text = "5"
end
if game.Workspace.Settings.Intermission.Value == 5 then
wait(1)
game.Workspace.Settings.Intermission.Value = 4
script.Parent.Frame.IntermissionNumber.Text = "4"
end
if game.Workspace.Settings.Intermission.Value == 4 then
wait(1)
game.Workspace.Settings.Intermission.Value = 3
script.Parent.Frame.IntermissionNumber.Text = "3"
end
if game.Workspace.Settings.Intermission.Value == 3 then
wait(1)
game.Workspace.Settings.Intermission.Value = 2
script.Parent.Frame.IntermissionNumber.Text = "2"
end
if game.Workspace.Settings.Intermission.Value == 2 then
wait(1)
game.Workspace.Settings.Intermission.Value = 1
script.Parent.Frame.IntermissionNumber.Text = "1"
end
if game.Workspace.Settings.Intermission.Value == 1 then
wait(1)
game.Workspace.Settings.Intermission.Value = 0
script.Parent.Frame.IntermissionNumber.Text = "0"
end
if game.Workspace.Settings.Intermission.Value == 0 then
wait(1)
game.Workspace.Settings.Intermission.Value = 0
script.Parent.Frame.IntermissionNumber.Text = "0"
end
Basically, what the script does is a count down that is global to everyone because it is using some Value's to see where the count down is at. and then it will be like that to all players in the GUI that I am using.
If you have any questions regarding the script bit that says : if game.Players.LocalPlayer.Value.Value == 0 It is basically editing a value that i imported to the player's folder in game.Players.LocalPlayer using another script.
I hope someone can help me resolve the issue in this script as I think I have covered all that I can think of that may help you to fix the problem.

1 comment
A little advice, it's a good programming habit to be lazy. If you are writing the same code more than once there is likely a better way to do it. In this case, a loop would work perfectly.