local PromptGui = script.Parent local ActionText = PromptGui.ActionText local Button = PromptGui.Button local Progress = Button.Progress local TS = game.TweenService local CurrentTween PromptGui.Enabled = false function SetupProximityPrompt(ProximityPrompt) ProximityPrompt.PromptShown:Connect(function() PromptGui.Enabled = true PromptGui.Adornee = ProximityPrompt.Parent ActionText.Text = ProximityPrompt.ActionText Button.Text = ProximityPrompt.KeyboardKeyCode.Name end) ProximityPrompt.PromptHidden:Connect(function() PromptGui.Enabled = false PromptGui.Adornee = nil end) ProximityPrompt.PromptButtonHoldBegan:Connect(function() CurrentTween = TS:Create(Progress,TweenInfo.new(ProximityPrompt.HoldDuration),{Size = UDim2.new(1,0,1,0)}) CurrentTween:Play() end) ProximityPrompt.PromptButtonHoldEnded:Connect(function() CurrentTween:Cancel() Progress.Size = UDim2.new(0,0,1,0) end) end for i,v in pairs(game.Workspace:GetDescendants()) do if v:IsA("ProximityPrompt") then SetupProximityPrompt(v) end end game.Workspace.DescendantAdded:Connect(function(Child) if Child:IsA("ProximityPrompt") then SetupProximityPrompt(Child) end end)
This is literally all I needed. I understand exactly what's happening in this script without having to scroll past the hundreds of lines from the template offered on Roblox's Creator Hub page. Definitely gonna use this as the base for my prompt systems from this point forward.
Will this work for multiple parts? Like what if I have a script that loops through a folder to check for multiple parts with the same proximity prompt to be triggered?
How do you make one for a controller? Such as changing the keyboard display to controller display whenever you connect your controller into your roblox game? (As in E changing to the X button from an xbox controller)
Yes. U can change the action text label -> ActionText Text Button. Then, type this script like the totorial: local PromptGui = script.Parent local ActionText = PromptGui.ActionText local Button = PromptGui.Button local Progress = Button.Progress local TS = game.TweenService local CurrentTween PromptGui.Enabled = false function SetupProximityPrompt(ProximityPrompt) ProximityPrompt.PromptShown:Connect(function() PromptGui.Enabled = true PromptGui.Adornee = ProximityPrompt.Parent ActionText.Text = ProximityPrompt.ActionText Button.Text = ProximityPrompt.KeyboardKeyCode.Name end) ProximityPrompt.PromptHidden:Connect(function() PromptGui.Enabled = false PromptGui.Adornee = nil end) ProximityPrompt.PromptButtonHoldBegan:Connect(function() CurrentTween = TS:Create(Progress,TweenInfo.new(ProximityPrompt.HoldDuration),{Size = UDim2.new(1,0,1,0)}) CurrentTween:Play() end) ProximityPrompt.PromptButtonHoldEnded:Connect(function() CurrentTween:Cancel() Progress.Size = UDim2.new(0,0,1,0) end) end for i,v in pairs(game.Workspace:GetDescendants()) do if v:IsA("ProximityPrompt") then SetupProximityPrompt(v) end end game.Workspace.DescendantAdded:Connect(function(Child) if Child:IsA("ProximityPrompt") then SetupProximityPrompt(Child) end end)
local PromptGui = script.Parent
local ActionText = PromptGui.ActionText
local Button = PromptGui.Button
local Progress = Button.Progress
local TS = game.TweenService
local CurrentTween
PromptGui.Enabled = false
function SetupProximityPrompt(ProximityPrompt)
ProximityPrompt.PromptShown:Connect(function()
PromptGui.Enabled = true
PromptGui.Adornee = ProximityPrompt.Parent
ActionText.Text = ProximityPrompt.ActionText
Button.Text = ProximityPrompt.KeyboardKeyCode.Name
end)
ProximityPrompt.PromptHidden:Connect(function()
PromptGui.Enabled = false
PromptGui.Adornee = nil
end)
ProximityPrompt.PromptButtonHoldBegan:Connect(function()
CurrentTween = TS:Create(Progress,TweenInfo.new(ProximityPrompt.HoldDuration),{Size = UDim2.new(1,0,1,0)})
CurrentTween:Play()
end)
ProximityPrompt.PromptButtonHoldEnded:Connect(function()
CurrentTween:Cancel()
Progress.Size = UDim2.new(0,0,1,0)
end)
end
for i,v in pairs(game.Workspace:GetDescendants()) do
if v:IsA("ProximityPrompt") then
SetupProximityPrompt(v)
end
end
game.Workspace.DescendantAdded:Connect(function(Child)
if Child:IsA("ProximityPrompt") then
SetupProximityPrompt(Child)
end
end)
@@VyunYT It should be mobile supported already
@@randomfunnymomentguyit doesn’t even work
@@randomfunnymomentguynone of the functions work
@@kawaiipotatoYT. They do ;-;
@@kawaiipotatoYT. did you patch the issue ? the local script wont work when i press E it don't show the progress
I didn't understand how to do this for months.. And you teached me in just a minute. ABSOLUTE LEGEND!!!
This is literally all I needed. I understand exactly what's happening in this script without having to scroll past the hundreds of lines from the template offered on Roblox's Creator Hub page. Definitely gonna use this as the base for my prompt systems from this point forward.
thanks for making the script simple and easily adjustable
it is nice to see you again :D
it is very helpful 😊
Omg wow thank you so much this tut helped me alot!
This guy is the god of Roblox Studio
how the hell did one teach me something i struggle on for such a long time. IN A MINUTE?!
Will this work for multiple parts? Like what if I have a script that loops through a folder to check for multiple parts with the same proximity prompt to be triggered?
🤓🤓
@@DavinciTheSpy go to school
sddqdQ
Good to see you again yingjie cormade
straight to the point
How do you make one for a controller? Such as changing the keyboard display to controller display whenever you connect your controller into your roblox game? (As in E changing to the X button from an xbox controller)
Step 1: use your Xbox
Step 2: it says X
YINGJIE IS BACK, NICE VIDEO!
Bro woke up
Steven hawking?!
How to make it mobile accessible?
Can you make it mobile friendly?
it is working for mobile?
I've done everything right but it doesn't let me click on it when I test it any help?
Yes. U can change the action text label -> ActionText Text Button. Then, type this script like the totorial:
local PromptGui = script.Parent
local ActionText = PromptGui.ActionText
local Button = PromptGui.Button
local Progress = Button.Progress
local TS = game.TweenService
local CurrentTween
PromptGui.Enabled = false
function SetupProximityPrompt(ProximityPrompt)
ProximityPrompt.PromptShown:Connect(function()
PromptGui.Enabled = true
PromptGui.Adornee = ProximityPrompt.Parent
ActionText.Text = ProximityPrompt.ActionText
Button.Text = ProximityPrompt.KeyboardKeyCode.Name
end)
ProximityPrompt.PromptHidden:Connect(function()
PromptGui.Enabled = false
PromptGui.Adornee = nil
end)
ProximityPrompt.PromptButtonHoldBegan:Connect(function()
CurrentTween = TS:Create(Progress,TweenInfo.new(ProximityPrompt.HoldDuration),{Size = UDim2.new(1,0,1,0)})
CurrentTween:Play()
end)
ProximityPrompt.PromptButtonHoldEnded:Connect(function()
CurrentTween:Cancel()
Progress.Size = UDim2.new(0,0,1,0)
end)
end
for i,v in pairs(game.Workspace:GetDescendants()) do
if v:IsA("ProximityPrompt") then
SetupProximityPrompt(v)
end
end
game.Workspace.DescendantAdded:Connect(function(Child)
if Child:IsA("ProximityPrompt") then
SetupProximityPrompt(Child)
end
end)
Can you make it mobile supported?
fr
how do i make objectText?
thank you save my doors withthis tutorial
this is only for pc but what about phone and console players how do they know what to do?
like under 1:02.01 not 55 sec
he finished in 55 seconds, the rest was just him showing the results
@@creepermccreations :)
guess mobile buttons dont matter
its sadly out dated for some reason parent dosnt work
this doesnt make sense and its not working
but does it work for mobile?
This worked but the door i used this on didn't
how about phone players?
MY DOOR
It didn’t work for me
when i put the text labels i can see them on the screen and i dont know what to do
Make sure you made a "BilboardGUI" and set its adornee to the proximity prompt part.
return of the king🎉
the only king is jesus christ
it's not work for mobile
i cant follow through-
it worked but I couldnt make it disapear later, even deleting the billboard in-game
thats coz u didnt set the adornee to nil at the end
@@Taiyeeb-g5s :))
But is good video thanks
can u create a model
dude its still showing me the orginal and it worked how to remove the orginal prompt..
did you perhaps not set the prompt to custom
make the prompt's style to custom
why is blox war 3 privated ;-;
I really dont understand this
LOL HE DIDNT TO PASTE THE SCRIPT IN PASTEBIN
pls model
how do i do an image version
use an imagelabel
Noice.
I NEED TO WRITE ALL THIS REALLY?
Delete this dumb comment man..
SIZE AND POSSIION
YESSIR WE USING THE SIIE AND POSSIION WITH THIS ONE
sucked ngl