I don't want the item to stay in the users inventory when they die.
This is what I have:
function.ontouch("Brick1") give (user) ("Sword1") wait(0) end
Any help is appreciated. Oh and don't say I didn't try because I did, I'm a noob scripter. Thanks!
brick = game.Workspace.Part item = game.Lighting.Sword brick.Touched:connect(function(hit) item:Clone().Parent = hit.Parent end)
You'd need a debounce so the player doesn't get a million swords, and depending on your situation, a line to check if the part that touches the brick is actually part of the player.