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

my script do not work which should take a player back to stage 1 please help me out ..?

my script dont work i want to make a script that resets a player and take him back to stage 1 this is my script

script.Parent.Touched:Connect(function(hit)
     
         if hit.Parent:FindFirstChild("Humanoid") then
         hit.Parent.Team = game.Teams.Stage1
         wait(1)
         hit.Parent:BreakJoints()  
end)

this do not work please help

1 comment

0

what's in the output though

1 answer

✓ Accepted answer

Properly indent your script. Incorrect indentation can lead to errors.

script.Parent.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		local player = [hit.Parent.Name]
		player.Team = game.Teams.TEAMNAME
		wait(1)
		hit.Parent:BreakJoints()
	end
end)

You also forgot to add another end to end off the if statement. Not only that but you cannot change a player's team the way you put it. Hope this helped!

1 comment

0

Good seeing the missed end. I think you might have forgot to actually find the player in game.Players after getting the name though.

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