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 8 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

local passId = 281488416-- change this to your game pass ID.

function isAuthenticated(player) -- checks to see if the player owns your pass
    return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId)
end

game.Players.PlayerRespawned:connect(function(plr)
    if isAuthenticated(plr) then
        local dman = game.Lighting.Customs.Dmans["Dman's Dank Blue"]:Clone()
        dman.Parent = plr.Backpack
    end
end)

1 answer

Log in to vote
0
Answered by 8 years ago
local passId = 281488416

function isAuthenticaed(plr)
    return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId)
end

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        if isAuthenticated(player) then
            game.Lighting.Customs.Dmans["Dman's Dank Blue"]:clone().Parent = player.Backpack
        end
    end)
end)
0
Let me know if this works. TheZankonator -2 — 8y
0
Ty very much xlaser23 60 — 8y
0
clone() is deprecated. can you like explain your answers as well unmiss 337 — 8y
Ad

Answer this question