Hello so I am making a game where you step on the platform and you equip a sword and you fight simple and it works. (I got this script off another forumn) the problem is I don't know how to add/change the script to make it where when you step off the platform your sword goes away/unequipps. this is my following script
local block = game.Workspace.MF local sword = game.ReplicatedStorage.Heal
block.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then if not hit.Parent:FindFirstChildWhichIsA("Tool") then if not game.Players[hit.Parent.Name].Backpack:FindFirstChild(sword.Name) then sword:Clone().Parent = hit.Parent print(sword.Name .. " gave to " .. hit.Parent.Name) end end end end)
MF is the name of the part that you stand on to get a sword. the script works great btw. I also have another platform on the map that does the same thing
What can I add to the script to make it so you lose your sword when you step off. I don't want to mess anything up

1 comment
I do get what your saying but for the magnitude option which parts of the script do I put in a custom number or amount, and you said to paste it at the bottom, would I do it after all the ends? or where exactly is it located.