Hello my question is how would i code it for a player to spawn with a weapon only when they get teleported. i have the teleportation code already done and working and the code for the weapon being in their inventory when they spawn, put how would i get the weapon behind a gamepass?
local sword = game.ReplicatedStorage.Sword local newsword = sword:Clone() newsword.Parent = player.Backpack
that is my code for spawning with the weapon when teleported.
if game.GamePassService:PlayerHasPass(1279980489)then local sword = game.ReplicatedStorage.ThrowingChicken local newsword = sword:Clone() newsword.Parent = player.Backpack
i tried the code above to lock a weapon behind a gamepass but it will not work. any suggestions?

1 comment
Thank you so much!!