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

How do i make a user be told to hold a button when approached an object, like JailBreak?

Asked by 6 years ago

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

1 answer

Log in to vote
1
Answered by 6 years ago
Edited 6 years ago

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
0
How do i make it so when i press 'e' on a brick, it performs an action such as printing "hello world"? dontyoucare 0 — 6y
0
"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 chess123mate 5873 — 6y
Ad

Answer this question