I need help by moving a "Part" from right to left using BodyVelocity here is the Script i done:
while true do w=game.Workspace.Part.BodyVelocity.Velocity w=Vector3.new(10*0*0) wait(2) w=Vector3.new(-10*0*0) wait(1) end
How do i move the part from right to left using BodyVelocity?
Properties
When you set a variable to a property, you set it to the value for the property - Not the actual property. This means that when you change the variable again, you're only changing the value of the variable and not the value of the property.
while true do w=game.Workspace.Part.BodyVelocity w.Velocity=Vector3.new(10*0*0) wait(2) w.Velocity=Vector3.new(-10*0*0) wait(1) end
The solution is to set the Velocity every time.