I need to know this, because my current code only awards the gun once. How could I change this to work that way?
local passId = 168101268 -- change this to your game pass ID. function isAuthenticated(player) -- checks to see if the player owns your pass return game:GetService("GamePassService"):PlayerHasPass(player, passId) end game.Players.PlayerAdded:connect(function(plr) if isAuthenticated(plr) then wait (10) local permpack = plr.Backpack local turretgun = game.Lighting.Turret:clone() turretgun.Parent = permpack end end)
This should fix your problem:
local passId = 168101268 -- change this to your game pass ID. function isAuthenticated(player) -- checks to see if the player owns your pass return game:GetService("GamePassService"):PlayerHasPass(player, passId) end game.Players.PlayerAdded:connect(function(plr) if isAuthenticated(plr) then wait (10) local permpack = plr.Backpack local starteritem = plr.StarterGear local turretgun = game.Lighting.Turret:clone() turretgun.Parent = permpack turretgun.Parent = starteritem end end)
You should check this for extra help and to learn how to make things stay with the player!
Locked by adark and Shawnyg
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?