So I have a block, when you go through it, it clones a tool from replicated storage and puts it in the player's backpack
It all works, it's just when the player dies, it's not in the backpack anymore, and since it's in the past level they can't go back and re-retrieve it.
Here's the script for the part.
local buttonPressed = false
script.Parent.Touched:connect(function(hit)
if not buttonPressed then
buttonPressed = true
if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
local Bucket = game.ReplicatedStorage["A Bucket of Water"]:Clone()
local character = hit.Parent
local player = game.Players:GetPlayerFromCharacter(character)
Bucket.Parent = player.Backpack
end
wait(10)
buttonPressed = false
end
end)

1 comment
THANK YOU! I NEVER KNEW ABOUT THAT! This will also help with a sword that you pick up near the end of the level. 2 problems solved! Thank you!