I've been trying to make a homing bullet simular to the one in cuphead yall get the idea
code:
local TS = game:GetService("TweenService")
local tweeninfo = TweenInfo.new(
1,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0
)
for i,v in pairs(game.Workspace:GetChildren()) do
if v:FindFirstChild("Humanoid") then
if not game.Players:FindFirstChild(v.Name) then
local target = v
local tween = TS:Create(script.Parent, tweeninfo, {Position = target.HumanoidRootPart.Position})
tween:Play()
end
end
end
wait(5)
script.Parent:Destroy()

2 comments
I'll check into it but I want it to follow the nearest non-player character
It works for anything, it just have to be a block, read the article I put