|
| 09 Jun 2014 01:22 AM |
Hello, Im Trying to make a script that gives a player a weapon if he touches the block that the script is in. But if the person doesnt have agamepass, the script wont give the player a weapon...This is what i have soo far..PLEASE HELP!
gpid = 160467392
GPS = Game:GetService("GamePassService") function OnTouched(part) if GPS:PlayerHasPass(player, gpid) then player = part.Players:FindFirstChild("Humanoid") game.Lighting:FindFirstChild("Red Knife"):Clone().Parent = player.Backpack end end
script.Parent.Touched:connect(onTouched)
Thanks, BD
|
|
|
| Report Abuse |
|
KOzero
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
|
| 09 Jun 2014 03:04 AM |
player =game.Players:GetPlayerFromCharacter(Workspace.Player) It would be more efficient if you used the PlayerAdded event for this. |
|
|
| Report Abuse |
|