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)

4 comments
Try using FE scripts like firing the server, new to this sort of stuff, could be that.
Can't use LocalPlayer in a server script. Instead of game.Players.LocalPlayer.Back.... use player.Backpack.....
That fixed it for me, cheers!
:connect is deprecated, use Connect instead mate