How to Make Automatic Sliding Doors | Roblox Scripting Tutorial

  Рет қаралды 4,753

Monkey Study

Monkey Study

Күн бұрын

Пікірлер: 22
@wasnexhere
@wasnexhere Жыл бұрын
wow, this made me learn a few things about tables! thanks!
@danqq_s
@danqq_s 17 күн бұрын
thank you so much. your a legend.
@ItzLimee16
@ItzLimee16 Жыл бұрын
Can some one help me mine opens but doesn't close
@EmotiveYT
@EmotiveYT Жыл бұрын
got the doors to open just they wont close
@DanzFirst
@DanzFirst 9 ай бұрын
For who that code didn't work, try this local TweenService = game:GetService("TweenService") local PlayersTouching = {} local Door1 = game.Workspace.Door1 local Door2 = game.Workspace.Door2 local Door1Start = Door1.Position local Door2Start = Door2.Position local Door1End = Vector3.new(Cords where you want the door open) local Door2End = Vector3.new(Cords where you want the door open) local Info = TweenInfo.new(1.5) local Detector = game.Workspace.Detector Detector.Touched:Connect(function(part) local Humanoid = part.Parent:FindFirstChild("Humanoid") if Humanoid then local player = game.Players:GetPlayerFromCharacter(Humanoid.Parent) if not table.find(PlayersTouching, player) then table.insert(PlayersTouching, player) TweenService:Create(Door1, Info, {Position = Door1End}):Play() TweenService:Create(Door2, Info, {Position = Door2End}):Play() end end end) Detector.TouchEnded:Connect(function(part) local Humanoid = part.Parent:FindFirstChild("Humanoid") if Humanoid then local player = game.Players:GetPlayerFromCharacter(Humanoid.Parent) if table.find(PlayersTouching, player) then table.remove(PlayersTouching, table.find(PlayersTouching, player)) if #PlayersTouching == 0 then TweenService:Create(Door1, Info, {Position = Door1Start}):Play() TweenService:Create(Door2, Info, {Position = Door2Start}):Play() end end end end) game.Players.PlayerRemoving:Connect(function(player) if table.find(PlayersTouching, player) then table.remove(PlayersTouching, table.find(PlayersTouching, player)) if #PlayersTouching == 0 then TweenService:Create(Door1, Info, {Position = Door1Start}):Play() TweenService:Create(Door2, Info, {Position = Door2Start}):Play() end end end) The original code didn't worked (the door didn't close), so i just inserted a hash # in front of the PlayersTouching and it worked lol I hope I was helpfull :)
@RealDashLite
@RealDashLite Ай бұрын
T
@blewedeh
@blewedeh 3 күн бұрын
You are my savior
@LivingSpace2233
@LivingSpace2233 Жыл бұрын
yo if you see this can you send me the code its not working
@Kurdish75
@Kurdish75 Жыл бұрын
Can someone help me with line 23
@Squ1ble
@Squ1ble Жыл бұрын
There's no way this works anymore because I have done the exact same coding and it is not working for me.
@monkeystudyroblox
@monkeystudyroblox Жыл бұрын
Did you input the correct positions?
@ethanmarks4210
@ethanmarks4210 Жыл бұрын
Hello good job, I was wondering if i could hire you to make a door for my game? its as simple thought of sliding door up and down, let me know if you are interested.
@LAT3R
@LAT3R 2 жыл бұрын
Is there anything wrong with this code or does it not work anymore because the doors wont open. local TweenService = game:GetService("TweenService") local PlayersTouching = {} local Door1 = game.Workspace.Door1 local Door2 = game.Workspace.Door2 local Door1Start = Door1.Position local Door2Start = Door2.Position local Door1End = Vector3.new(101.5, 5.25, 0.5) local Door2End = Vector3.new(84.5, 5.25, 0.5) local Info = TweenInfo.new(1.5) local Detector = game.Workspace.Detector Detector.Touched:Connect(function(part) local Humanoid = part.Parent:FindFirstChild("Humanoid") if Humanoid then local player = game.Players:GetPlayerFromCharacter(Humanoid.Parent) if not table.find(PlayersTouching, player) then table.insert(PlayersTouching, player) TweenService:Create(Door1, Info, {Position = Door1End}):Play() TweenService:Create(Door2, Info, {Position = Door2End}):Play() end end end)
@Aleksandria_Nori
@Aleksandria_Nori 2 жыл бұрын
it wont open for me too
@LAT3R
@LAT3R 2 жыл бұрын
@@cleo-mantik thanks!!
@lemonsucksatobbying
@lemonsucksatobbying Жыл бұрын
@@LAT3R what did they say?
@trowso3912
@trowso3912 11 ай бұрын
Guys script dosent work if you use model!
@spladjavookie27
@spladjavookie27 Ай бұрын
Is there any way to do it with a model?
@senortele1155
@senortele1155 2 жыл бұрын
Script pls
@oqti_xx3715
@oqti_xx3715 Жыл бұрын
These scripts are outdated if they arnt gonna work
@Q.Quasar.Q
@Q.Quasar.Q Жыл бұрын
How can a script be ourdated
the COOLEST game feature YOU'RE NOT USING!
7:41
Crusherfire
Рет қаралды 46 М.
How to make Robux from game visits only!? (HOW MUCH I MADE)
9:40
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
Sliding Door Roblox Studio Tutorial
12:46
CyberCreator
Рет қаралды 100 М.
StarterGui vs. PlayerGui | Roblox Studio Tutorial
4:22
Monkey Study
Рет қаралды 4,2 М.
How To Make Automatic Sliding Door In Roblox Studio
17:17
PowerMonkey
Рет қаралды 12 М.
HOW TO CREATE VIDEO ADS IN ROBLOX (IMMERSIVE ADS)
3:41
Monkey Study
Рет қаралды 729
DON'T Make a Roblox Game Without Watching This First.
27:20
SmartyRBX
Рет қаралды 630 М.
E to Open Door | Proximity Prompt | Roblox Scripting Tutorial
11:00
CyberCreator
Рет қаралды 271 М.
How to Disable CoreGuis | Roblox Scripting Tutorial
3:11
Monkey Study
Рет қаралды 730
How To EASILY Make Procedural Animations In Roblox
6:46
Roox4
Рет қаралды 117 М.
How To Make A Tool In Roblox
2:17
Insider Tech
Рет қаралды 281 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН