Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

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

Asked by 5 months ago
Edited 5 months ago

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

Log in to vote
0
Answered by 5 months ago

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

0
well done, now you can mark it as [SOLVED] theking48989987 2009 — 5mo
Ad

Answer this question