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

Please have a look at this script?

Asked by
DevWork 80
9 years ago

I'v tried to find the issue with this script but it hasn't come to me. I'm wanting it to team the player to SWAT if they have a gamepass.

player = script.Parent.Parent.Parent.Parent.Parent
id = 164948636

script.Parent.MouseButton1Click:connect(function()
 if Game:GetService("GamePassService"):PlayerHasPass(player, id) then
  player.TeamColor = game.Teams['SWAT'].TeamColor
  player.Character:breakJoints()
 end
end)

2 answers

Log in to vote
0
Answered by
RedCombee 585 Moderation Voter
9 years ago

Try:

script.Parent.MouseButton1Down:connect(function()
0
Hasn't worked. DevWork 80 — 9y
Ad
Log in to vote
0
Answered by
TopDev 0
9 years ago
player = script.Parent.Parent.Parent.Parent.Parent
id = 164948636

script.Parent.MouseButton1Click:connect(function()
    if Game:GetService("GamePassService"):PlayerHasPass(player, id) then 
  player.TeamColor = game.Teams.SWAT.TeamColor
  player.Character:breakJoints()
 end
end)

0
Not worked. DevWork 80 — 9y

Answer this question