of     1   

FlightVector
#139457939Sunday, July 06, 2014 9:31 PM GMT

for the instance of this: local x = script.Parent.X.Value if x < 24 then b.velocity = b.velocity + Vector3.new(2,0,0) repeat wait() until x > 25 or x == 25 x is a constantly changing value, however the script only uses the first value that x was and does not update that value. How can I get it to constantly check the value of x?
ScottRhode
#139458213Sunday, July 06, 2014 9:34 PM GMT

for the instance of this: repeat x = script.Parent.X.Value if x < 24 then b.velocity = b.velocity + Vector3.new(2,0,0) until x >= 25 -- >= means greater OR equal than
FlightVector
#139459116Sunday, July 06, 2014 9:42 PM GMT

it just crashes studio...
Vuva
#139459621Sunday, July 06, 2014 9:47 PM GMT

local x = script.Parent.X.Value repeat x=x+1 b.velocity = b.velocity + Vector3.new(2,0,0) until x>=25 The if statement is pointless and you're never changing x
FlightVector
#139460279Sunday, July 06, 2014 9:53 PM GMT

X is the X position of a moving brick outside the script. The whole purpose is to move the brick to "variable" distance away and stop it once it reaches that distance.
Vuva
#139462106Sunday, July 06, 2014 10:12 PM GMT

Well, the .Changed event dosen't really work for the part's Position property, so the only way I can think of doing this is the cheap way: never ending loop. while wait() do if scirpt.Parent.X<25 then script.Parent.Velocity=script.Parent.Velocity+Vector3.new(2,0,0) end end And I'm assuming the part you want affected is the parent of the script.

    of     1