How to make knife go infront of u

how to make knife spawn infront of you and go infront
this is my script

local rep = game.ReplicatedStorage

local Deb = game:GetService(“Debris”)

local anim = script.Throw:Clone()
local hitanim = script.Hit:Clone()

local camera = game.Workspace.CurrentCamera

rep.Stand.TW.Knife.OnServerEvent:Connect(function(Player, direction)
wait(0.6)
local Character = Player.Character or Player.CharacterAdded:Wait()
local stand = Character:WaitForChild(“Stand”)

local knife = script.Knife1:Clone()
knife.CFrame = Character.HumanoidRootPart.CFrame * CFrame.new(0,0,0)
knife.Parent = workspace
knife.Velocity = Character.HumanoidRootPart.CFrame.lookVector * 90

local ignorelist = {}

local antiGravity = Instance.new("BodyForce")
antiGravity.Force = Vector3.new(0, workspace.Gravity * script.Knife1:GetMass(), 0)
antiGravity.Parent = script.Knife1



knife.Touched:Connect(function(hitpart)
	antiGravity:Destroy()
	if not hitpart:IsDescendantOf(Character) then
		if hitpart.Parent:FindFirstChild("Humanoid") then
			local enemy = hitpart.Parent
			if (table.find(ignorelist,enemy) == nil) then
				table.insert(ignorelist,enemy)
				enemy.Humanoid:TakeDamage(4)
				enemy.Humanoid:LoadAnimation(hitanim):Play()
				local Blood = script.Blood:Clone()
				Blood.Parent = enemy.UpperTorso
				enemy.Humanoid.WalkSpeed = 5
				Enemy.Backpack.Value.UsingMove.Value = true
				wait(1.25)
				knife:Destroy()
				antiGravity:Destroy()
				Blood:Destroy()
				enemy.Humanoid.WalkSpeed = 16
				Enemy.Backpack.Value.UsingMove.Value = false
			end				
		end
	end
end)
spawn(function()
	wait(30)
	knife:Destroy()
end)

end)

1 Like