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

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

Asked by 6 years ago
Edited 6 years ago

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

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

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
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} Sheeeittnode 7 — 6y
Ad

Answer this question