Hello. I'm New On Scripting.
script.Parent.Velocity = Vector3.new(5,0,0)
Thats A My Script.
But Not Working
Not Changing Velocity Value. Why?
2 answers
Your script:
script.Parent.Velocity = Vector3.new(5,0,0)
The reason for this is basically to keep doing the movement on the object, this means it will continue instead of one stop, this will keep doing it in a loop so that it keeps moving.
while wait() do
script.Parent.Velocity = Vector3.new(5,0,0)
end
1 comment
Why did you give me a -1 reputation, I explained what it is, I just forgot about the engine stuff, I'm trying to make it easier.
Unless the part is Anchored, the Roblox physics engine will constantly update the Velocity property of all simulated parts. When your code runs, it will set the Velocity of script.Parent to 5, 0, 0 for a split-second, then the physics engine takes over and the part will simulate normally. The result of this is like 'punching' the part. If you want to create a stable velocity (eg. to make the part 'fly' at a particular speed), you will need to insert a BodyVelocity into the part.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Thanks for Helping :)