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()
G'day! Like you, I don't have much experience in homing missiles, but I did a simple google search and found this: RocketPropultion
The RocketPropulsion
object applies a force on a part so that it both follows and faces a target part. It acts like a hybrid of BodyPosition
and BodyGyro
. Unlike other BodyMovers, a RocketPropulsion
must be instructed to begin applying a force: call Fire to start, or call Abort to stop.
Hope it helped, SuperPuiu.