I want my whale humanoid to move straight forward from its starting point underwater.
The issue is when I use the MoveTo() function to achieve this, the whale acts weird (as you can see in the video) and doesn’t reach the location I wanted it to.
I’ve read that it’s natural for a humanoid to flip like that when in water, but I want to know if there is any way I can just make it move straight forward? I know that CFraming its movements would be glitchy, and I don’t know of any other way to move it except for maybe using body velocity or something like that. I tried to add an animation so that the torso wouldn’t flip but it doesn’t go forward.
My whale model is a custom humanoid and rigged. I changed its body density in my script so that it doesn’t float or sink. After the whale’s rotation goes back to normal, it prints “Whale stopped moving”. The red dot in the video shows the location where it is meant to swim to.
Here is my script, it’s placed underneath my whale model:
local whale = game.Workspace.Whale local humanoid = whale.Humanoid --Changing the whale's body density so that it won't float up. for _, Part in pairs(whale:GetDescendants()) do if Part:IsA("BasePart") then print("Changing") Part.CustomPhysicalProperties = PhysicalProperties.new(.97, 0.3, 0.5) --density, friction, elasticity end end humanoid:MoveTo(Vector3.new(-492.59, 49.786, 2606.829)) humanoid.MoveToFinished:Wait(1) print("Whale stopped moving")