Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to get my CFrame script to work when welding makes it unusable?

Asked by 5 years ago
local time = 0.02 --how fast you want to move
brick = script.Parent
-----------------------------------------
moveX = 0
moveY = 0 -- how far you want to move
moveZ = 1
-----------------------------------------
while true do -- Makes a loop
brick.CFrame = brick.CFrame - Vector3.new (moveX, moveY, moveZ) 
wait (time)
brick.CFrame = brick.CFrame - Vector3.new (moveX, moveY, moveZ) 
wait (time)
-- reverse
brick.CFrame = brick.CFrame + Vector3.new (moveX, moveY, moveZ) 
wait (time)
brick.CFrame = brick.CFrame + Vector3.new (moveX, moveY, moveZ) 
wait (time)
end

When i weld my tool and this scirpt is in it it destroys it. Help?

Answer this question