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

Pressed E key, the item moves to your inventory! How to do?

Please write a script. When the E key is pressed, the item moves to your inventory.

The main thing is to write how to make the item move into inventory.

2 comments

0

This ain't no request site bud

0

This isn't a request site - however, if you are willing to put in the work yourself or at least try - you would want to use UserInputService.

1 answer

Hey,

As SummerEquinox said, this isn't really a request site. But I can link you a few wiki pages that could help you out.

UserInputService handling keyboard input - https://www.robloxdev.com/api-reference/class/UserInputService

ContextActionService another way of handing keyboard input (better in my opinion) - https://www.robloxdev.com/api-reference/class/ContextActionService

Magnitude telling the distance between two Vector3's. (assuming you would have to walk near this item to pick it up) - https://www.robloxdev.com/articles/Magnitude

player:GetDistanceFromCharacter(Vector3) telling the distance between the character and a vector3. - https://www.robloxdev.com/api-reference/function/Player/DistanceFromCharacter

If this answer didn't help, feel free to reply with any questions or comments.

If this did help, please remember to accept and upvote the answer.

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