HertsDan
(Ro_land)
May 27, 2022, 8:52am
#1
This post is related to my previous post but the problem was, that my tower won’t rotate constantly, that’s not what I want. The MaxTorque is already infinite, infinite, infinite and the Dampenent is already 0, How do I fix this?
Here are some parts of the script that are related to BodyGyro:
NewTower.HumanoidRootPart.BodyGyro.CFrame = TargetCFrame
BodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
BodyGyro.D = 0
BodyGyro.CFrame = NewTower.HumanoidRootPart.CFrame
BodyGyro.Parent = NewTower.HumanoidRootPart
If you want constant rotation shouldn’t you use Angular velocity or BodyAngularVelocity instead? Or maybe a combination with body gyro
1 Like
HertsDan
(Ro_land)
May 28, 2022, 2:08am
#3
I used BodyAngularVelocity and they’re spinning endlessly and not trying to damage the enemies, the output said:
"ServerScriptService.Main.Towers:83: BodyAngularVelocity is not a valid member of MeshPart “Workspace.Towers.Outrider.HumanoidRootPart”
Here are the new lines that I made (I forgot to add the TargetCFrame variables on the main post above):
local TargetCFrame = CFrame.lookAt(NewTower.HumanoidRootPart.Position, Target.HumanoidRootPart.Position)
NewTower.HumanoidRootPart.BodyAngularVelocity = TargetCFrame -- The error
local BodyAngularVelocity = Instance.new("BodyAngularVelocity")
BodyAngularVelocity.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
BodyAngularVelocity.Parent = NewTower.HumanoidRootPart