Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Help, creating a grab object tool/built in function?

Hi, I am making a game very similar to half life 2 and need to create a function in game so when you press E you can pick up an object. Having it built in would be very nice but a tool works, Im guessing I could easily import a tool to built in anyways. I have searched all over youtube with different searches and cant find ONE video. Can someone direct me to a How-To or explain how I could do this? Im guessing it would be similar to when E pressed a function is made to Parent the object a mouse cursor is looking at onto your arm/face/right in front of you using vector3, but I am a beginner scripter whos knowledge goes from, making health bars, sound envirments, game teleporters, to damage bricks, aswell as advanced GUI's but I dont know anything about say making an object move or spin in game. Please direct me to a how-to/video/instructions or tell me your discord so we can talk, or even just post a comment explaining, anything helps!

1 answer

First of all, this is not a request site, so provide a script with things you have tried so we can help you.

You could try to make it so that when you're in the range of an item you can pick up, if you press E you pick it up. Try using Region3 and keyboard input for this. If you want the player to point to the object and then press E, check if the player hovers over an object you can pick up, and then when they press E they pick it up.

Good luck!

This discussion is preserved as it was. New answers, comments, and votes are closed.