I have a script which makes the door open and close making it look like that a intruder want to go in there. However it’s slowly and I want it to be fast. How do I do it?
local TweenService = game:GetService("TweenService")
local hinge = script.Parent.Hinge
local goalOpen = {}
goalOpen.CFrame = hinge.CFrame * CFrame.Angles(0, math.rad(1), 0)
local goalClose = {}
goalClose.CFrame = hinge.CFrame * CFrame.Angles(0, 0, 0)
local tweenInfo = TweenInfo.new(1)
local tweenOpen = TweenService:Create(hinge, tweenInfo, goalOpen)
local tweenClose = TweenService:Create(hinge, tweenInfo, goalClose)
while true do
tweenClose:Play()
task.wait(0.2)
tweenOpen:Play()
task.wait(0.2)
end