Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I fix this team change button script in my team change GUI??

Asked by 3 years ago

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)
0
the script wont work if its a localscript FurryPapal 90 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

Nevermind i moved it to a local script it works now

Ad

Answer this question