So I wanted to put the sword as a child of the local script, and the local script would clone it's child and parent it to your backpack when the Forcefield disappears. The local script is in the StarterCharacterScripts file. Here's the script:
local sword = script.ClassicSword wait(3) --this is the forcefield duration time local swordclone = sword:Clone() swordclone.Parent = game.Players.LocalPlayer.Backpack
But when I test it, my first spawn I had the sword. When I reset my character, I did not get the sword. I need help
i think i got it. (it worked in roblox studio)
game:GetService('Players').PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) wait(3) local swordclone = game.ReplicatedStorage.sword:Clone() swordclone.Parent = player.Backpack character:WaitForChild("Humanoid").Died:Connect(function() wait(8) --add the respawntime with the forcefield duration time. (respawn time is found in players) local swordclone = game.ReplicatedStorage.sword:Clone() swordclone.Parent = game.Players.LocalPlayer.Backpack end) end) end)
i hope it helped you