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

How do I show that the play is holding down a button?

Asked by 2 years ago
Edited 2 years ago

I want to have the player to hold down E to open a door but i dont want the default proximity prompt because it doesnt fit the style of my game.

i want to have that once the player holds down the corresponding key that a bar appears that will be attached as a frame to the Letter E (that replaces the look of the proximity prompt as i made the style custom) the max size of the bar will be {0, 50}, {0, 5} and i want to go from 0 to 50 in 2 seconds

im quite new to roblox studio and lua as a whole so ive just been searching it all up as i go and i cant seem to find the right thing im looking for - not loading screens.

Thanks,

SoulHomie23

p.s sorry for my bad grammar, ive typed this quite fast.

This is all i have so far and even though it was working, it is not anymore


local TweenService = game:GetService("TweenService")

  wait(10)
  script.Parent:TweenSize(UDim2.new(0,50,0,5), "Out", "sine", 2)

wait(2)
script.Parent.Transparency = 1

Answer this question