wow, this made me learn a few things about tables! thanks!
@danqq_s17 күн бұрын
thank you so much. your a legend.
@ItzLimee16 Жыл бұрын
Can some one help me mine opens but doesn't close
@EmotiveYT Жыл бұрын
got the doors to open just they wont close
@DanzFirst9 ай бұрын
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Ай бұрын
T
@blewedeh3 күн бұрын
You are my savior
@LivingSpace2233 Жыл бұрын
yo if you see this can you send me the code its not working
@Kurdish75 Жыл бұрын
Can someone help me with line 23
@Squ1ble Жыл бұрын
There's no way this works anymore because I have done the exact same coding and it is not working for me.
@monkeystudyroblox Жыл бұрын
Did you input the correct positions?
@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.
@LAT3R2 жыл бұрын
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_Nori2 жыл бұрын
it wont open for me too
@LAT3R2 жыл бұрын
@@cleo-mantik thanks!!
@lemonsucksatobbying Жыл бұрын
@@LAT3R what did they say?
@trowso391211 ай бұрын
Guys script dosent work if you use model!
@spladjavookie27Ай бұрын
Is there any way to do it with a model?
@senortele11552 жыл бұрын
Script pls
@oqti_xx3715 Жыл бұрын
These scripts are outdated if they arnt gonna work