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 team change button script in my team change GUI??

I wrote this script inside a text button which is inside a GUI, but it does not work. It is supposed to change their team when they click it, then respawn them so they spawn on that team.

local plr = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
	plr.TeamColor = BrickColor.new("Rust")
	wait(1)
	plr.Character.Humanoid.Health = 0
end)

1 comment

0

the script wont work if its a localscript

1 answer

Nevermind i moved it to a local script it works now

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