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

How to make the activating player reset via click to a button?

Asked by 6 years ago

It might have been hard to explain it on the title, but I have a script, that changes the player's team, but the problem is that the player doesn't reset as I'd like it to do, help please ! Obviously, I don't know, I've also tried to make the player reset...

local Button = script.Parent
local Teams = game:GetService("Teams")
local event = game:GetService("ReplicatedStorage"):WaitForChild("ChangeTeam")
local Player = game.Players.LocalPlayer

function OnClicked()
    event:FireServer(Teams:WaitForChild("Crew"))
end

Button.MouseButton1Down:Connect(OnClicked)

Answer this question