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

How do I make a model move across the map smoothly with script?

Asked by 5 years ago
Edited 5 years ago

I am currenctly using this script. It works perfectly smooth in roblox studio but half of it moves moves and after about 0.1 seconds, the other half joins it while in game. Causing it to have some kinda lag effect but I really isn't lagging. I tried using weld and glue but it is the same outcome. Please help me

while true do
    local Flight = game.Workspace.FlightModel
    Flight:SetPrimaryPartCFrame(Flight:GetPrimaryPartCFrame() * CFrame.new(0,0,-5))
    wait(.01)
end

1 answer

Log in to vote
0
Answered by
Oficcer_F 207 Moderation Voter
5 years ago
Edited 5 years ago

Try this:

model = [your model]

for move= 1,300,0.1 do


model.Position = Vector3.new(0,0,move)
wait(0.1)

end

Try this, I think the for loop shouldn’t lag

0
which one is the z position FirezoneGamez 155 — 5y
0
The last one. Tell me if it works! An accepted answer is greatly appreciated! Oficcer_F 207 — 5y
0
I changed the script! Oficcer_F 207 — 5y
Ad

Answer this question