if you guys want the door to close after 3 seconds here is the script: local frame = script.Parent local Frame = script.Parent local openSound = frame:WaitForChild("DoorOpen") local closeSound = frame:WaitForChild("DoorClose") local proximityprompt = Frame:WaitForChild("ProximityPrompt") local model = frame.Parent local frameClose = model:WaitForChild("DoorFrameClose") local frameOpen = model:WaitForChild("DoorFrameOpen") local opened = model:WaitForChild("Opened") local tweenService = game:GetService("TweenService") local debounce = true proximityprompt.Triggered:Connect(function() if debounce == true then debounce = false if opened.Value == true then opened.Value = false
else opened.Value = true openSound:Play() tweenService:Create(frame,TweenInfo.new(1),{CFrame = frameOpen.CFrame}):Play() wait(3) --- How Many Seconds closeSound:Play() tweenService:Create(frame,TweenInfo.new(1),{CFrame = frameClose.CFrame}):Play() end wait(1) debounce = true end end) ------------------------------------------ Hope This Helped!
Here is the correct script, make sure everything is named as the local parts at the top say so at the end of each one. local frame = script.Parent local openSound = script.Parent.DoorOpen local closeSound = script.Parent.DoorClose local proximityprompt = script.Parent.ProximityPrompt local model = script.Parent.Parent local frameClose = model.DoorFrameClose local frameOpen = model.DoorFrameOpen local opened = model.DoorFrame.Opened local tweenService = game:GetService("TweenService") local debounce = true proximityprompt.TriggerEnded:Connect(function() if debounce == true then debounce = false if opened.Value == true then opened.Value = false closeSound:Play() tweenService:Create(frame,TweenInfo.new(1),{CFrame = frameClose.CFrame}):Play() else opened.Value = true openSound:Play() tweenService:Create(frame,TweenInfo.new(1),{CFrame = frameOpen.CFrame}):Play() end wait(1) debounce = true end end)
No, it has to be a union. There is a different way to do it for model doors. I might make a video on that later. I am not very good at scripting, so you can test it, but I do not think it works.
@@GnakkoPakko hello! i was wondering if you could make a tutorial for models, since there's this showcase that i really want to finish and i really have to make a sliding door 😭 it would be very appreciated and helpful for other people!
@@Cameron0001I literally tried as well snd I have been watching 42 videos of hoe to do this on repeat I DID ALL TEH STEPS CORRECTLY SND IT IS NOT WORKING I GO FRAME BY FRAME AND IT DOESNT WORK PLUS IM ON THE SAME VERSION IF ROBLOX STUDIO
You need to make a new part that didn't move and put the proximity in there, lets call that a button, To declare it, locate where you put your script, and then try call the button function to make proximityprompt work,
The Script is incorrect, here's the right one: local frame = script.Parent local openSound = frame.DoorOpen local closeSound = frame.DoorClose local proximityprompt = frame.ProximityPrompt local model = frame.Parent local frameClose = model.DoorFrameClose local frameOpen = model.DoorFrameOpen local opened = model.Frame.Opened local tweenService = game:GetService("TweenService") local debounce = true proximityprompt.TriggerEnded:Connect(function() if debounce == true then debounce = false if opened.Value == true then opened.Value = false closeSound:Play() tweenService:Create(frame,TweenInfo.new(1),{CFrame = frameClose.CFrame}):Play() else opened.Value = true openSound:Play() tweenService:Create(frame,TweenInfo.new(1),{CFrame = frameOpen.CFrame}):Play() end wait(1) debounce = true end end)
Thanks I used this to make a manual elevator door
if you guys want the door to close after 3 seconds here is the script:
local frame = script.Parent
local Frame = script.Parent
local openSound = frame:WaitForChild("DoorOpen")
local closeSound = frame:WaitForChild("DoorClose")
local proximityprompt = Frame:WaitForChild("ProximityPrompt")
local model = frame.Parent
local frameClose = model:WaitForChild("DoorFrameClose")
local frameOpen = model:WaitForChild("DoorFrameOpen")
local opened = model:WaitForChild("Opened")
local tweenService = game:GetService("TweenService")
local debounce = true
proximityprompt.Triggered:Connect(function()
if debounce == true then
debounce = false
if opened.Value == true then
opened.Value = false
else
opened.Value = true
openSound:Play()
tweenService:Create(frame,TweenInfo.new(1),{CFrame = frameOpen.CFrame}):Play()
wait(3) --- How Many Seconds
closeSound:Play()
tweenService:Create(frame,TweenInfo.new(1),{CFrame = frameClose.CFrame}):Play()
end
wait(1)
debounce = true
end
end)
------------------------------------------
Hope This Helped!
how would I change the speed of the door?
Here is the correct script, make sure everything is named as the local parts at the top say so at the end of each one.
local frame = script.Parent
local openSound = script.Parent.DoorOpen
local closeSound = script.Parent.DoorClose
local proximityprompt = script.Parent.ProximityPrompt
local model = script.Parent.Parent
local frameClose = model.DoorFrameClose
local frameOpen = model.DoorFrameOpen
local opened = model.DoorFrame.Opened
local tweenService = game:GetService("TweenService")
local debounce = true
proximityprompt.TriggerEnded:Connect(function()
if debounce == true then
debounce = false
if opened.Value == true then
opened.Value = false
closeSound:Play()
tweenService:Create(frame,TweenInfo.new(1),{CFrame = frameClose.CFrame}):Play()
else
opened.Value = true
openSound:Play()
tweenService:Create(frame,TweenInfo.new(1),{CFrame = frameOpen.CFrame}):Play()
end
wait(1)
debounce = true
end
end)
wait how is this the correct scirpt
@@decayingwithglory parts he named doesn't match with the script
Thanks so much! It REALLY helped with my game!
I bet you quit working on your game lmfao
@@الخلبوصة Bro why would u say that
you're probably right 💀
@@shadowshocking998
😂😂😂
Amazing tutorial,Tysm
what is the sound id for the open and close noise on the first door?
Nice tutorial! But you should showcase and explain the scripts so people could understand
right i wanna learn something and not just always use totoriels
Still helpful one year later! any chance you can make a tutorial like this for a double sliding door?
how can i make the prompt clickable from a different position?
Can u give me sound ID for opening and closing door audio
how do you keep the prompt in 1 place, ive been having trouble with this and the sound, where do you insert the sound!?!?
what was that booltool and how did you create the value that makes it work?
I followed the video exactly but it doesnt work. Ive even rewatched the video three times. Was there an update that messed this up?
Did I miss something or was there just no script at all?
damn bro tysm ur a king fr
It works?
can you make a keycard version?
the door i want to slide is a model itself, i added a design to it and everything then i grouped it as a model, will it work in this case?
No, it has to be a union. There is a different way to do it for model doors. I might make a video on that later. I am not very good at scripting, so you can test it, but I do not think it works.
@@GnakkoPakko Yeah it doesnt work unfortuantely 😕 ty for the fast reply! truly appreciate it
@@GnakkoPakko hello! i was wondering if you could make a tutorial for models, since there's this showcase that i really want to finish and i really have to make a sliding door 😭 it would be very appreciated and helpful for other people!
It seemed to have worked for me!
followed everything but didnt work when pressed e
Which version of Roblox Studio did you use? The sliding door did not open😢…
You have to do it correctly it works
@@Cameron0001he do correctly it works
@@Cameron0001I literally tried as well snd I have been watching 42 videos of hoe to do this on repeat I DID ALL TEH STEPS CORRECTLY SND IT IS NOT WORKING I GO FRAME BY FRAME AND IT DOESNT WORK PLUS IM ON THE SAME VERSION IF ROBLOX STUDIO
You noobs just use a detection part with touched and Touchended events
use collection service if your game has hundreds of doors.
How would I change the speed of the door?
Hello how can you make it clickable and not press e ???
Does this work for group game and do i need sound
wait why i can't open the door? there is an interact button but it did not work
Is something wrong?
I really need it but it seems to not work. Maybe make another part please since it didn’t work
I made a union instead of a part and now the door don't work, why is that so?
what if you put the script in then proximity prompt
You can try it, I am not very good at scripting so Im not sure if it works.
@@GnakkoPakkoidk what I’m am doing wrong but it doesn’t work for me
i see in your video their is the model for me i never had that model im wondering where did it come from
Thank yuo very much sir
This video is quite helpful, but i wanted to make a door where proximity prompt stays in one place, not moves with the door.
You need to make a new part that didn't move and put the proximity in there, lets call that a button,
To declare it, locate where you put your script, and then try call the button function to make proximityprompt work,
Moon is a model, not a part of Moon, but how do I make it when Moon is model?
i ve followed this entire script yet it doesnt work
Thanks bro
thank you
Can you please tell us how you got the value?
boolvalue
does it work with group doors?
Didn't work. Only the "E to interact" appeared but it did nothing
Make sure to rename the bool tool "Opened" n note "DoorOpened"
@@raldix_ykw you mean bool value?
@@dabbingformylife yea
How to make cooldown open door?
Change the debounce time
The Script is incorrect, here's the right one:
local frame = script.Parent
local openSound = frame.DoorOpen
local closeSound = frame.DoorClose
local proximityprompt = frame.ProximityPrompt
local model = frame.Parent
local frameClose = model.DoorFrameClose
local frameOpen = model.DoorFrameOpen
local opened = model.Frame.Opened
local tweenService = game:GetService("TweenService")
local debounce = true
proximityprompt.TriggerEnded:Connect(function()
if debounce == true then
debounce = false
if opened.Value == true then
opened.Value = false
closeSound:Play()
tweenService:Create(frame,TweenInfo.new(1),{CFrame = frameClose.CFrame}):Play()
else
opened.Value = true
openSound:Play()
tweenService:Create(frame,TweenInfo.new(1),{CFrame = frameOpen.CFrame}):Play()
end
wait(1)
debounce = true
end
end)
You can use a detection part with touched and touchended instead of proximityPrompt
Like demonfall's?
Model link please i have no time .
lazy ahh
Ill update if it works
Doesnt work.
@@lycheetism Hey, if you want you can add me on discord and I will help you
@@GnakkoPakko Ok
Nvm, it worked.
can you make a sliding window please
And yes please do this
its not working because i unioned it
Everything doesent work for me
It did not work for me at first but when i looked carefuly and slowly and did everything he did i got it to work
maybe you named some wrong or mispell
@@stantheone0967 exact same story for me i ve done absolutely everything to get it to work
dope
Thank you!
It doesn't work
Doesn't work and followed all the steps perfectly.
Didn't work at all 😕
doesnt work
roblox studio ...
yes
Roblox is a game engine 👍🏾
Yeah,what's the problem😂
@@Frosty1300they might be on ipad or phone
Cap
Noob
scam
it doesn't work🥲🥲🥲(cipson flipson)