Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would i fix the moving platform so it does not bug for some people ?

a friend told me about cFrame but i didnt understood him

while true do

if waitTime == 0 then waitTime = 1 end
if sec >= maxSec then
  right = not right
  sec = 0
end

for key,value in pairs(table) do
    if right then
        value.Position = value.Position + Vector3.new(0.5, 0, 0)
    else
        value.Position = value.Position - Vector3.new(0.5, 0, 0)
    end
end

 sec = sec + (1 * waitTime)
 wait (waitTime)

end

1 answer

✓ Accepted answer

Check out the wiki.

Also you can use this :)

while wait(0.01) do
	local ver = 100 -- Distance / How many times it takes to move
	for i = 0, ver do
	script.Parent.CFrame = script.Parent.CFrame+Vector3.new(0, 0, 1)
	wait()
	end
	wait(0.5) -- Time to return
	for i = 0, ver do
	script.Parent.CFrame = script.Parent.CFrame+Vector3.new(0, 0, -1)
	wait()
	end
	end

1 comment

0

Oh okay i think its important to say that the stuff is in a model i've set a local table : local table = {Workspace.LabObby.MovingSlow.Inside, Workspace.LabObby.MovingSlow.Outline}

This discussion is preserved as it was. New answers, comments, and votes are closed.