Hello. Im using an vectorforce on an object, but its not moving. It has an attachment and is relative to it, i have a force on it too.
Heres more info about the properties of the vectorforce:
I suggest you use BodyVelocity instead, since Mass and Gravity (Maybe friction too) affects VectorForce you need to do something like
local Part = Script.Parent
local Mass = Part:GetMass()
local VectorForce = Script.Parent.VectorForce
local Speed = 100
VectorForce.Force = (0,(Mass*workspace.Gravity)+Speed,0)
Does bodyvelocity accelerate to the speed or just get to the speed instantly?
It goes to the speed instantly, you can use :lerp() or TweenService if you don’t want it to be instant
The script you suggested has an error which is “Assigning 3 values to 1 variable leaves some values unused”
I forgot to add Vector3
local Part = Script.Parent
local Mass = Part:GetMass()
local VectorForce = Script.Parent.VectorForce
local Speed = 100
VectorForce.Force = Vector3.new(0,(Mass*workspace.Gravity)+Speed,0)
also note that you can’t get a constant/fixed speed with vectorforce, it’ll keep increasing unless you add a dragforce which could be difficult to implement
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.