Script here:
local doortween1 = script.Parent.Parent.Tween1
local doortween2 = script.Parent.Parent.Tween2
local door = script.Parent.Parent.Door
function onTouched(hit)
if not hit or not hit.Parent then return end
local human = hit.Parent:findFirstChild("Humanoid")
if human and human:IsA("Humanoid") then
game.TweenService:Create(door,TweenInfo.new(0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.In),{CFrame = doortween1.CFrame}):Play()
script.Disabled = true
wait(1)
script.Disabled = false
game.TweenService:Create(door,TweenInfo.new(0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.In),{CFrame = doortween2.CFrame}):Play()
script.Disabled = true
wait(1)
script.Disabled = false
end
end
script.Parent.Touched:connect(onTouched)
#easy #tutorial #robloxstudio #robloxstudiotutorial #roblox #howto
Негізгі бет How to make a Automatic Door in Roblox Studio!
No video
Пікірлер: 35