Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i fix this glitch?

local A = Instance.new("Hint",game.Workspace)

while game.Workspace.Intermission.Value == true do
	wait(1)
	game.Workspace.Time.Value = game.Workspace.Time.Value - 1
	A.Text = "game will start in "..game.Workspace.Time.Value--Intermission
	
	
	
	if game.Workspace.Time.Value == 0 then
		A.Text = "Game Starting!!!"
		A.Parent = game.Lighting
		game.Workspace.Intermission.Value = false -- Start Game

		players = game.Players:GetChildren()
		for i = 1,#players do
		wait(0.5)
		a = game.Workspace:WaitForChild(players[i].Name)
		a.Torso.CFrame = game.Workspace:FindFirstChild("P"..i).CFrame
		end
	for b = 0,500 do
	wait(0.1)
	game.Workspace.Wall.CFrame = game.Workspace.Wall.CFrame * CFrame.new(0,0,0.5) * CFrame.fromEulerAnglesXYZ(0,0,0)
end
		wait(5)
		A.Text = "Game Ended!"
		A.Parent = game.Workspace
		game.Workspace.Time.Value = 20
		game.Workspace.Intermission.Value = true
	D = a:FindFirstChild("Humanoid")
	D.Health = 0
	
		game.Workspace.Wall.CFrame = game.Workspace.WallBase.CFrame
		
	end
	
	end
	

game.Players.PlayerAdded:connect(OnPlayerEntered)

The player doesent die after the game is over and sometimes only one player dies

1 answer

Please, format your code. This is really hard to read.

Anyways, the problem is that you are only going to the last player in the list. Simply add this instead of your killing code:

for _,v in pairs(game.Players:GetPlayers()) do
	v.Character:BreakJoints();
end

1 comment

0

Thank you and sorry im a amateur scripter its really messy

This discussion is preserved as it was. New answers, comments, and votes are closed.