Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I weld an object to the player's left hand? (Not a tool)

Asked by
trapiz 4
5 years ago

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.

1 answer

Log in to vote
0
Answered by 5 years ago

So, if you've already welded it together, then do this.

--> after button is pressed
local item = game:FindService("ReplicatedStorage"):WaitForChild(ITEMNAMEHERE):Clone()
item.Parent = Player.Character["Left Hand"]
wait(1)
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!

0
I put the Health potion in ReplicatedStorage, in the output it says "Health Potion is not a valid member of ReplicatedStorage" trapiz 4 — 5y
0
Make sure it's like this :WaitForChild("Health Potion") and that it's not in a folder SevenDevelopment 2 — 5y
0
Okay, now it says "Left Hand is not a valid member of model" trapiz 4 — 5y
Ad

Answer this question