function Click(mouse)
if script.Parent.Parent.Parent.Parent.Parent.TeamColor ~= game.Teams.Pirus.TeamColor then
script.Parent.Parent.Parent.Parent.Parent.TeamColor = game.Teams.Pirus.TeamColor
end
end
Player = script.Parent.Parent.Parent.Parent.Parent
Humanoid = game.Players:findFirstChild("Humanoid")
if Player ~= nil then
if Player.TeamColor == game.Teams.Pirus.TeamColor then
Player.Humanoid.WalkSpeed = 100 --WalkSpeed
end
end
script.Parent.MouseButton1Click:connect(Click)
What I'm trying to do is when you press a GUI button, you will be on the team and once you're on that team, you'll get 100 walkspeed. When I press it, it doesn't work. The character walkspeed of the person doesn't change at all. What is wrong with this script?

1 comment
Explain you answer.