I made a health potion and I've already welded it together with Quenty's script, but I want it so when you press the specified button the potion will appear in the player's left hand and disappear after 1 second.
So, if you've already welded it together, then do this.
1 | --> after button is pressed |
2 | local item = game:FindService( "ReplicatedStorage" ):WaitForChild(ITEMNAMEHERE):Clone() |
3 | item.Parent = Player.Character [ "Left Hand" ] |
4 | wait( 1 ) |
5 | item:Destroy() |
Put a click detector in the button.
And use API MouseClick()
The parameter in "MouseClick" gives you the PLAYER who clicked it, so remember that.
Challenge yourself, chap, have a good day!