Goal: Knife to be used in a murder game. (Like Twisted Murderer or Murder Mystery 2)
What I want to achieve: A lot of customization, Throwable, of course being able to stab.
pretty much want to have the best possible results with making a knife.
Goal: Knife to be used in a murder game. (Like Twisted Murderer or Murder Mystery 2)
What I want to achieve: A lot of customization, Throwable, of course being able to stab.
pretty much want to have the best possible results with making a knife.
Maybe you can cast a ray from the mouse position and tween the knifes position to the result of the ray casts position. This is for throwing
Tell me if you want an example
An example would be very very helpful!
local mouse = game.Players.LocalPlayer:GetMouse()
local raycastParams = RaycastParams.new()
local Ts = game:GetService("TweenService")
local knifetween = TweenInfo.new(1)
script.Parent.Activated:Connect(function()
raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
local raycastResult = workspace:Raycast(script.Parent.Position,mouse.hit.p , raycastParams) -- Casts the ray
if raycastResult then -- Checks if the ray it something
local BClone = script.Parent.Handle:Clone() -- Clones the knife
BClone.Parent = workspace
BClone.Position = script.Parent.Handle.Position
local goal = {}
goal.Position = raycastResult.Position
local Track = Ts:Create(BClone,knifetween,goal) -- Tweens the knife position to the place where the ray ended
Track:Play()
Track.Completed:Wait()
wait(3)
BClone:Destroy() -- Destroys the knife after it lands
end
end)
This is just an example your knife may look different
So raycast should be a good way to go then. (i tested it and it wasnt the prettiest thing but it still worked in a way I seem to be wanting) with that Ima look into more Raycast and learn as much as I can to get it near perfection!
Ps. Thanks for that little demo you gave! <3
There is also the dot product too