I have written a script for a gate to go down smoothly, on the client side. However, when you start the game an wait 10 seconds the gate suddenly disappears without the wanted "smoothiness"

local Gate = game.Workspace.Castle.GATE
local GatePX = Gate.CFrame.X
local GatePY = Gate.CFrame.Y
local GatePZ = Gate.CFrame.Z

wait(10)

for i = 0,10,0.1 do
	Gate.CFrame = Gate.CFrame * CFrame.new(GatePX,GatePY-i,GatePZ)
	wait(0.01)
end

5 comments

0

Use tweens!

0

uSe TwEeN SeRvIcE

0

what these guys said

0

Do you know any good sites on TweenService?