I don't want the item to stay in the users inventory when they die.
This is what I have:
1 | function .ontouch( "Brick1" ) |
2 | give (user) ( "Sword1" ) |
3 | wait( 0 ) |
4 | end |
Any help is appreciated. Oh and don't say I didn't try because I did, I'm a noob scripter. Thanks!
1 | brick = game.Workspace.Part |
2 | item = game.Lighting.Sword |
3 |
4 | brick.Touched:connect( function (hit) |
5 | item:Clone().Parent = hit.Parent |
6 | 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.