Roblox Studio - How to make Sliding Doors
ฝัง
- เผยแพร่เมื่อ 5 ก.พ. 2025
- Script :
-- Services --
local TS = game:GetService("TweenService")
-- Variables --
local Door = script.Parent
local TouchPart = script.Parent.TouchPart
local Open = false
-- Settings --
local Time = 1
-- Script --
-- Opens the door --
TouchPart.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
Open = true
if Open then
TS:Create(Door.PrimaryPart, TweenInfo.new(Time), {CFrame = Door.DoorOpened.CFrame}):Play()
Open = false
end
end
end)
-- Closes the door --
TouchPart.TouchEnded:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
Open = false
if not Open then
TS:Create(Door.PrimaryPart, TweenInfo.new(Time), {CFrame = Door.DoorClosed.CFrame}):Play()
Open = true
end
end
end)
No way a W underrated youtuber
praise Jesus whoever believes in him is saved read your bible and live for God amen!
Amen!
how do i start believing in god if i dont believe him at all... (i want to be saved)