How to make holding object by player's hand

Greetings! から:

To Roblox Developers
Hi, I’m making a game like “Half-Life 2”.
And, I had a problem when I making a script of “Holding objects system”.
Maybe you can’t understand what I want to say.
Please watch the video.

(around 4:24)

Can you help me? Thanks.

1 Like

Could you show us your attempt at it so we can let you know why it isn’t working?

Either way, I imagine it’d involve CFraming an object a certain size away from the player’s mouse (probably using the Hit property but clamping that position value so it doesn’t go too far). Also, instead of just CFraming, it’d probably involve Lerping so the transition is smooth and not snappy.

I don’t know how Valve worked with their interaction system for Source, but I could probably dig it up somewhere and have a better idea of how it works.

2 Likes

Thanks for reply!
I’ll go for it to make a script!:smiley:

If you havent already I would check out the amazing tutorial starmaq made ( its pretty much from what I can tell, what you are trying to do)

(The part in the tutorial is slowly moving to the mouse, you can probably change one of
forces to make it “snap” to the mouse)

3 Likes

Huge thanks for the support, I’m glad to see people recommend my article :happy2: