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

[SOLVED] I can't get a part to change position in a while loop, what's wrong?

So I'm very new to coding and felt that to practice I would make a frogger remake in order to hone my skills. However, I'm not sure what the problem with this script is. Any help? My script:

local car = script.Parent local carX = car.Position.X local carY = car.Position.Y local carZ = car.Position.Z

while true do carZ = carZ - 1 car.Vector3 = Vector3.new(carX,carY,carZ) print(car.Position) wait(0.5) end

1 answer

I realised my mistake, I had: car.Vector3 =Vector3.new where I should have used: car.Position = Vector3.new

1 comment

0

well done, now you can mark it as [SOLVED]

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