Hey, i want a player to approach an object and when close enough, is told to hold a button for a certain amount of time, then the object does something, an animation help would be nice too... JailBreak does an amazing job doing this when robbing a bank, arresting someone and getting into a car. Any help? Thanks
COMMUNITY QUESTION
How do i make a user be told to hold a button when approached an object, like JailBreak?
1 answer
To activate the GUI you could:
- Use invisible CanCollide=false parts with Touched events
- Have a script that continuously checks how far away a player is from various points of interest (and other players) by using
(pointOfInterest - humanoidRootPart.Position).magnitude
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
How do i make it so when i press 'e' on a brick, it performs an action such as printing "hello world"?
"Press 'e' on a brick" - you mean, while the mouse is aiming at it? You would need to look into the UserInputService: wiki.roblox.com/index.php?title=API:Class/UserInputService also, the Mouse object has "Target" which could help you determine if the mouse is over the target object. Also consider using ClickDetectors. Mouse: http://wiki.roblox.com/index.php?title=API:Class/Mouse