I am trying to make it so that this intvalue changes but it won't change.

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
while true do
	game.ServerStorage.Map.Value = 1
	game.Workspace.Map1:GetChildren("SpawnLocation").Enabled = true
	char:BreakJoints()
	wait(15)
	game.ServerStorage.Map.Value = 2
	game.Workspace.Map1:GetChildren("SpawnLocation").Enabled = false
	game.Workspace.Map2:GetChildren("SpawnLocation").Enabled = true
	char:BreakJoints()
	
end
end)
end)


I want it so that when a Player joins it finds that players character and while the loop is running to set the values and all that stuff over and over.

4 comments

0

Remove the while loop, you only need to make a listener for an event once.

0

Are there any errors?

0

no errors. And I want to make it a loop constantly.

0

You should try using print() to see where the script stops. Also, does the map even have an IntValue? That's most likely your problem.