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

How do I fix this on death card dropper?

Asked by 5 years ago

I attempted to make a card drop when the Player dies, it works in studio, however not on website. (Regular Script) I can't figure this out:

game:GetService('Players').PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        character:WaitForChild("Humanoid").Died:connect(function()
        local Ca =  game.Players.LocalPlayer.Backpack.Card.Handle
        local Despawn = game.ServerStorage.DespawnScript:Clone(1)       
        Ca.Parent.Parent = workspace
        Ca.Position = player.character.Torso.Position
        Despawn.Parent = Ca.Parent
        Despawn.Disabled = false




        end)
    end)
end)
0
Try using FE scripts like firing the server, new to this sort of stuff, could be that. BunicornBoy 17 — 5y
0
Can't use LocalPlayer in a server script. Instead of game.Players.LocalPlayer.Back.... use player.Backpack..... ScrewDeath 153 — 5y
0
That fixed it for me, cheers! Lolgamer33221 0 — 5y
0
:connect is deprecated, use Connect instead mate User#19524 175 — 5y

Answer this question