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

I have no idea why my script for my obby checkpoints is not working so please help?

This is my current script:

local checkpoints = game.Workspace:WaitForChild("Checkpoints"):GetChildren()

for i, checkpoint in pairs(checkpoints) do checkpoint.TeamColor = game.Teams:FindFirstChild(checkpoint.Name) end

It is supposed to change your team when you step on a checkpoint but it is not. Whenever I spawn I am on the Neutral team. All of the checkpoints are set to Allow team change on touch and the teams are not auto assignable.

1 comment

0

Is Neutral turned on for the spawn points? If so, try it turned off.

1 answer

local checkpoints = game.Workspace:WaitForChild("Checkpoints"):GetChildren()
for i, checkpoint in pairs(checkpoints) do checkpoint.TeamColor = BrickColor.new("Really red") -- the brickcolor you want 
game.Teams:FindFirstChild(checkpoint.Name) end

5 comments

0

Thank you so much you are the best

0

Wait but I need it to hange the team every time it steps on a new checkpoint

0

Yes

0

Accept my answer if this helped you.

0

If you want it to change team colors all you have to do is change the brickcolor

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