You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
In my game, I want the character’s body to turn towards the Mouse.hit.Position in relatively short time -
What is the issue? Include screenshots / videos if possible!
Rather than taking a short time, it takes 15 seconds + to turn the character towards the mouse hit. Here’s the script
local bg = Instance.new("BodyGyro",script.Parent:WaitForChild("HumanoidRootPart",30))
bg.MaxTorque = Vector3.new(0,0,0)
bg.D = 10
function enablebg()
bg.MaxTorque = Vector3.new(400000, 20, 400000)
end
function disablebg()
bg.MaxTorque = Vector3.new(0,0,0)
end
function la(a)
return script.Parent.Humanoid:LoadAnimation(a)
end
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
local throwdeb = false
local cda = true
local holding = false
local panim = la(game.ReplicatedStorage.anims.weapons.default.pickup)
local hanim = la(game.ReplicatedStorage.anims.weapons.default.hold)
local tanim = la(game.ReplicatedStorage.anims.weapons.default.toss)
mouse.Button1Down:Connect(function()
if not throwdeb and cda then
throwdeb = true
holding = true
panim:Play()
wait(0.2)
hanim:Play()
enablebg()
end
end)
mouse.Button1Up:Connect(function()
if holding then
disablebg()
hanim:Stop()
tanim:Play()
holding = false
throwdeb = false
end
end)
while wait() do
if holding then
bg.CFrame = CFrame.lookAt(plr.Character.HumanoidRootPart.Position,mouse.Hit.Position,Vector3.new(0,1,0))
end
end
everything in it has worked, the animations included, it just turns really slow.
3. What solutions have you tried so far?
Raising the P, and lowering the dampening, nothing has worked.