Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Please have a look at this script?

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

Try:

script.Parent.MouseButton1Down:connect(function()

1 comment

0

Hasn't worked.

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)

1 comment

0

Not worked.

This discussion is preserved as it was. New answers, comments, and votes are closed.