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 approaching an facing an object, like JailBreak?

Asked by 6 years ago
Edited 6 years ago

Hey, i want a player to be told to hold a button for a certain amount of time when close to that object and the player is LOOKING at the object. The the object will then do something, some help on an animation telling the user to hold the button and a circle going around it would be great AS WELL... JailBreak does an amazing job doing this when robbing a bank, arresting someone and exploding a wall in the jail. Basically an 'e' to interact...Any help? Thanks...

0
Do you know how to script? GingeyLol 338 — 6y
0
Not too familiar dontyoucare 0 — 6y
0
Yeah i need that, and when holding 'e' a circle goes around it and something happens to the object when the circle is complete... dontyoucare 0 — 6y

1 answer

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

Not sure how to make some sort of textlabel float around the object, but I know how to make a GUI pop up on the screen within a distance of it, you probably already know but ill tell you anyways

Get a brick make it no colided, Invisible, resize it over the "wall" "door" etc, like a trigger from HL2  so that when you walk into the brick a function is made

The function script is

workspace.Triggerbox.Touched:connect(function(hit) if hit.Parent:FindFirstChild('Humanoid') then EtoOpenGUI.Visible = true end end)

workspace.Triggerbox.TouchEnded:connect(function(hit) if hit.Parent:FindFirstChild('Humanoid') then EtoOpenGUI.Visible = false end end)

I am currently using this as a way to play sounds in different areas of the map/

0
he says he can't script well. FlippinAwesomeCrew 62 — 6y
Ad

Answer this question