Hello, I’m trying to make an npc boat that attacks the player’s boat. But, I’m truly unsure on how to tackle this problem. I tried searching on devforum and on youtube to find any similar problems to no avail.
So far, I tried using body force and angular velocity, but I’m unsure on how to direct the boat to the player. Should I use CFrame or something?
oh, I didn’t see the part that said it would teleport. Humanoid isn’t the only way, you could try to make it face it with a AlignOrientation and then a AlignPosition to move it towards it.
Sorry for my late response. Anyways how do I exactly use align orientation? I tried searching it up, but I didn’t really get it.
Here’s what I have so far:
for i,v in pairs(workspace:GetChildren()) do
if v ~= npc and v.Name == "Boat" then
local distance = (v.Main.Position-npc.Main.Position).Magnitude
if distance <= 10000 then
Allign.Attachment1 = v.Main.Attachment
main.VectorForce.Force = seat.CFrame.LookVector * seat.MaxSpeed * seat.Torque
end
end
end
As of right now I think the solution lays on Body Gypro, but I’m still unsure how to use it even after research and I Body movers are quite depreceated.