Quick Story About Me
So I have spent the past weeking digging into CFrame more learning about things such as Motor6Ds, Dot Product, Math.Asin, etc and after lots of Trial and Error I was able to finally make this small system for my Knife Gear where your players arms and head looks towards the direction your mouse cursor points at to add a bit more realism to it and I just kept adding onto the system and optimizing it more and I am so Happy with the results it feels sooooo freaking smooth too! This Knife Also Comes With A Cool Ability Shown In the Video!
Quick Story About The Knife
So it is a Knife that is still being worked on you can Stab but it can’t kill when you Stab but I have been really focused on the throwing functions and it is completed along with a new Ability which is “Illuminati” based off the Illuminati Ability from a older roblox game "Twisted Murder. I’d say about 75% of the Knife is completed based off what I want done for it next!
The Knife
Extras
If you are interested in looking at what the Illuminati Knife Ability originally looked like from Twisted Murderer heres the video:
Original Illuminati Knife TW
Snip Of All The Code To Move The Arms And Head
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Workspace = game:GetService("Workspace")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local mouse = player:GetMouse()
local head = character:WaitForChild("Head")
local torso = character:WaitForChild("Torso") or character:WaitForChild("UpperTorso") -- R15 compatibility
local rightArm = character:WaitForChild("Right Arm") or character:WaitForChild("RightUpperArm")
local leftArm = character:WaitForChild("Left Arm") or character:WaitForChild("LeftUpperArm")
local neck = torso:FindFirstChild("Neck") or Instance.new("Motor6D", torso)
local rightShoulder = torso:FindFirstChild("Right Shoulder") or Instance.new("Motor6D", torso)
local leftShoulder = torso:FindFirstChild("Left Shoulder") or Instance.new("Motor6D", torso)
-- Default rotations
local defaultNeckC0 = neck.C0
local defaultRightShoulderC0 = rightShoulder.C0
local defaultLeftShoulderC0 = leftShoulder.C0
local camera = Workspace.CurrentCamera
RunService.RenderStepped:Connect(function()
if not character or not mouse then return end
local mousePos = mouse.Hit.p
local charPos = head.Position
-- Get the direction from the character to the mouse position
local charToMouse = (mousePos - charPos).Unit
-- Calculate yaw and tilt angles relative to the character
local yawAngle = math.asin(charToMouse:Dot(torso.CFrame.RightVector))
local tiltAngle = math.asin(charToMouse:Dot(Vector3.new(0, 1, 0)))
-- Apply limits to angles
yawAngle = math.clamp(yawAngle, -1, 1)
tiltAngle = math.clamp(tiltAngle, -0.3, 1)
-- Apply to head (neck)
neck.C0 = neck.C0:Lerp(defaultNeckC0 * CFrame.Angles(-tiltAngle, 0, -yawAngle), .1)
-- Apply to arms
rightShoulder.C0 = rightShoulder.C0:Lerp(defaultRightShoulderC0 * CFrame.Angles(0, -yawAngle, tiltAngle), .1)
leftShoulder.C0 = leftShoulder.C0:Lerp(defaultLeftShoulderC0 * CFrame.Angles(0, -yawAngle, -tiltAngle), .1)
end)
I intend on making this a free model after I am completed with it.
What Do You Think? ( If You Cant Give Criticism Voting Is Really Appreciated As It Does Help Out
)
- Its Amazing!
- Its Good
- Its Ok
- Its Bad
- Its Awful
0 voters
The Game
If you are interested in trying out the knife, the game will stay open to the public but it does not have mobile support at the moment still being worked on