MaxForce cannot be assigned to?

local Main = script.Parent.Parent.Parent.MAIN
local Velocity = Main.Velocity

Velocity.maxForce = Vector3.new(math.huge,0,math.huge)
Gyro.maxTorque = Vector3.new(0,math.huge,0)
Gyro.cframe = CFrame.new(Main.Position,game.Players[mouse]:GetMouse().Hit.p) – (mouse is defined as the player’s name)

[(https://cdn.discordapp.com/attachments/708647412779974667/713939924860010546/03f3512905c9b61dcf79ec9951e403f6.png)

[(https://cdn.discordapp.com/attachments/708647412779974667/713939267898048542/df90e22648fa9e136eb7931d0cb13ed0.png)

So I’m getting this error saying ‘MaxForce cannot be assigned to’ and I have no clue how to fix it so I came here, all relevant info is listed above.

1 Like

Have you checked if Main leads to the correct object you’re looking for? Also, “maxForce” is deprecated. You would want to correct it to “MaxForce.” You may also want to change “maxTorque” to “MaxTorque” and “cframe” to “CFrame” as they are deprecated with the capitalized versions I just stated above.

1 Like

I’ve tried it but still does not work :confused:

What did you try? Changing the deprecated functions or changing the variable, main?

i changed the maxTorque, cframe and maxForce to MaxTorque, CFrame and MaxForce
and i checked that Main leads to the right place

Have you tried printing out Velocity and debugging your script with prints?

Nope, I tried it right now and it worked Thanks.