Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make the knife point towards the mouse position? [closed]

Asked by
kyrumV2 -5
4 years ago
Edited 4 years ago

https://gyazo.com/0734d2f2ca3413e51ee0358a56620a19 Right now it always points same place but I dont know how to make it point different place HELP!!!

function throw(player,position,hrp,chr)
    clone = workspace.Knife:Clone()
    clone.Anchored =false
    clone.Parent = workspace
    clone.CFrame = hrp * CFrame.new(0,0,-1)
    print(position)
    clone.Velocity = 50*(position - hrp.Position).Unit
end
game.ReplicatedStorage.Remotes.KnifeThrow.OnServerEvent:Connect(throw)
0
You didn't provide much code to work with. However you will want to be working with CFrame to accomplish this. iiDayzie_Dreams 32 — 4y

Closed as Not Constructive by JesseSong and Leamir

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?