So how do I update the number of thrust force because when I do this
while true do
wait(1)
local thrust = script.Parent.BodyThrust
local part = script.Parent
if part.Orientation.X > 0 and part.Orientation.X < 40 then
thrust.Force.X == 1000
end
end
it says
Workspace.Model.body.Script:6: Incomplete statement: expected assignment or a function call
It should be thrust.Force.X = 1000. == is a relational operator, while = is an assignment operator.
2 Likes
You cannot change a value of a Vector3 directly. Instead you need to create a new Vector3 with the new value.
local force = thrust.Force
thrust.Force = Vector3.new(1000, thrust.Force.Y, thrust.Force.Z)
P.S. Please format your code properly so people can read the code more easily.
3 Likes