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

How can I change this to check for my team?

Asked by 10 years ago

I have tried youtube for it but no use! Please help!

player = script.Parent.Parent.Parent.Parent
team = game.Teams["Vostik Military"]
function onButtonClicked()
player.TeamColor = team.TeamColor
end
script.Parent.MouseButton1Down:connect(onButtonClicked)
1
Nothing wrong here assuming this is a GUI and all your paths are correct. You really should use a LocalScript and game.Players.LocalPlayer, though. Perci1 4988 — 10y
0
Well I wanted it to make sure the people are in my group before letting them switch snoppyploptart 59 — 10y
1
Then why didn't you say so? Anyways, you can use the IsInGroup() method of player. Perci1 4988 — 10y
0
Thank you! snoppyploptart 59 — 10y

Answer this question