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

Z's position went to 118, but it still keeps going for no reason... why won't this work?

Asked by 6 years ago

local Monster = script.Parent local ParticleEmitter = script.Parent.ParticleEmitter local Face = script.Parent.Decal

function move(MovePower, speed) if MovePower == true and speed == 5 then Monster.Orientation = Vector3.new(-90, 0, 0) repeat wait(0.001) Monster.Position = Monster.Position + Vector3.new(0, 0, 1) until game.Workspace.Part.Position.Z >= 118 end end

move(true, 5)

So When Z position is 118, it just keeps going. I tried the double equals but still wont work. Any suggestions?

0
Please, format your code corretly. iDarkGames 483 — 6y
0
why do you use game.Workspace.Part.Position and not Monster.Position? theCJarmy7 1293 — 6y

Answer this question