My desire is to make a script that rotates the plow on this A-Chassis vehicle in Roblox Studio. However, when this script runs, it moves the entire unanchored
A-Chassis car and bugs it out.
Any solutions or ideas on how to fix it if it is possible?
Here is my current code.
local blade = script.Parent.Blade
local rotationAmount = 20
local rotationSpeed = 1
local function rotateBlade()
local currentRotation = 0
while currentRotation < rotationAmount do
blade.CFrame = blade.CFrame * CFrame.Angles(0, math.rad(rotationSpeed), 0)
currentRotation = currentRotation + rotationSpeed
wait()
end
end
rotateBlade()
There is also a video demonstrating what the current code does.
1 Like
I believe you would unanchor the plow, use weld-constraints, and maybe for the rotation use a hinge constraint instead?
Not sure, but Iād give it a try!
1 Like
In A-Chassisa, the whole vehicle and its descendants are automatically unanchored and welded to each other so the vehicle can move.
After experimenting further, this seems to be caused because A-Chassis welds everything in the model to each other. Is there a way to stop the plow from being welded to everything else?
Alright, the real thing I need now is an answer to this question; How do you make a part/mesh rotate a certain amount of degrees through a script, WITHOUT ROTATING THE PARTS THAT IT IS WELDED TO?
Would appreciate any possible scripts or support.