Im trying to subtract every single milisecond but it's not working for me it keeps returning a error in the output saying Z cannot be assigned





local BodyVelocity = script.Parent.BodyVelocity

  

  

while true do

wait()

BodyVelocity.Velocity.Z = BodyVelocity.Velocity.Z - 1 --Subtracts every milisecond

  

end

2 comments

0

try BodyVelocity.Velocity = BodyVelocity.Velocity - Vector3.new(0, 0, 1)

0

Yeah, Roblox Studio doesn't allow you to change one axis specifically, so you have to do something like what MegaManSam1 said.