Trying to make a moving wall with bodyvelocity that stops at a certain position
x = game.workspace.Wall
if x.Position==Vector3.new==245.5, 134, 0 then x.BodyVelocity.Velocity=Vector3.new==0 end
Trying to make a moving wall with bodyvelocity that stops at a certain position
x = game.workspace.Wall
if x.Position==Vector3.new==245.5, 134, 0 then x.BodyVelocity.Velocity=Vector3.new==0 end
You have some mistakes here, quite major ones. First off, Vector3.new is a built-in function, and because it's a function it needs parenthesis instead of equals.
Your code but fixed:
local x = game.Workspace.Wall -- making it local will increase performance
if x.Position == Vector3.new(245.5, 134, 0) then
x.BodyVelocity.Velocity = Vector3.new(0, 0, 0)
end
this doesnt give errors but it still doesn't seem to be working.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
please put it in a code block