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

How do i define a player respawning if i can?

Asked by 9 years ago

If not,

Answer this how would i make a player keep a item with his game pass if when the code is written like this

01local passId = 281488416-- change this to your game pass ID.
02 
03function isAuthenticated(player) -- checks to see if the player owns your pass
04    return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId)
05end
06 
07game.Players.PlayerRespawned:connect(function(plr)
08    if isAuthenticated(plr) then
09        local dman = game.Lighting.Customs.Dmans["Dman's Dank Blue"]:Clone()
10        dman.Parent = plr.Backpack
11    end
12end)

1 answer

Log in to vote
0
Answered by 9 years ago
01local passId = 281488416
02 
03function isAuthenticaed(plr)
04    return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId)
05end
06 
07game.Players.PlayerAdded:connect(function(player)
08    player.CharacterAdded:connect(function(character)
09        if isAuthenticated(player) then
10            game.Lighting.Customs.Dmans["Dman's Dank Blue"]:clone().Parent = player.Backpack
11        end
12    end)
13end)
0
Let me know if this works. TheZankonator -2 — 9y
0
Ty very much xlaser23 60 — 9y
0
clone() is deprecated. can you like explain your answers as well unmiss 337 — 9y
Ad

Answer this question