[URGENT] Hand is not out when pulling out a tool

What are you attempting to achieve? (Keep it simple and clear)

I’m trying to get the hand infront of the camera (Like DOORS :eye:)

What is the issue? (Keep it simple and clear - Include screenshots/videos/GIFs if possible)

What solutions have you tried so far? (Have you searched for solutions through the Roblox Wiki yet?)

I have, but they haven’t given me the result I needed

7 Likes

You would need to play an animation when a tool is equipped. The hand moving is an animation.

1 Like

Do you know which animation (in the animation localscript) I could edit?

3 Likes

You have to use local transparency to show the hand.

To disable the tool animation do what the other person said and disable the tool none in the default animation script.

2 Likes

The hand is visible, just won’t be infront of you when pulling out an item.

3 Likes

Yes that’s why you change the local transparency when equipping. Can you send a photo of what you have?

3 Likes

I’m confused, can you tell me what you wan’t me to do right now?

2 Likes

the hand is already visible, no need for this

3 Likes

Ohhh lol I just realized the photo you sent wasn’t doors. I thought the photo was what you want LOL. Anyways you could make the rootpart face the camera. But, for this you would need to have a tool none animation.

3 Likes

LOL!!
Also:

…Whats a toolnone animation?
Would I just need to edit anything?

1 Like

Edit: I found it in the animation script, I’ll make the hand only animation

2 Likes

There should be a default one though.

The animation one I have doesn’t have /e emotes enabled.

classic /e emotes aren’t effected by these.

1 Like

Same result :sad:
The item follows the players hand…


So do you want something like this? (Ignore the revered flash light and the invisible arm)

1 Like

Yes! Exactly like that!!

(I’ll ignore the reverted flashlight)

Ahh well sorry for making this post so long with my misunderstandings.

So you will want to make the root and the arm point towards the camera. You can do this by doing something like this:

local RunService = game:GetService("RunService")
local character = script.parent
local player = game:GetService("Players").LocalPlayer
local mouse = player:GetMouse()

local Camera = workspace.CurrentCamera

local Head = character:WaitForChild("Head")
local Neck = Head:WaitForChild("Neck")

local Torso = character:WaitForChild("UpperTorso")
local Waist = Torso:WaitForChild("Waist")

local Humanoid = character:WaitForChild("Humanoid")
local HumanoidRootPart = character:WaitForChild("HumanoidRootPart")

local NeckOriginC0 = Neck.C0
local WaistOriginC0 = Waist.C0

Neck.MaxVelocity = 1/3

local humanoid = character:WaitForChild("Humanoid")
local torso = character:WaitForChild("UpperTorso")
local leftArm = character:WaitForChild("LeftUpperArm")
local rightArm = character:WaitForChild("RightUpperArm")
local rightShoulder = rightArm:WaitForChild("RightShoulder")
local leftShoulder = leftArm:WaitForChild("LeftShoulder")
local camera = game.Workspace.CurrentCamera

local currentC0Left = leftShoulder.C0
local currentC0Right = rightShoulder.C0

local updateSpeed = 0.5/2

function getPoint()
	local r=Camera:ViewportPointToRay(mouse.X, mouse.Y,1337);
	return r.Origin+r.Direction;
end;

RunService.RenderStepped:Connect(function() 
	local CameraCFrame = Camera.CoordinateFrame

	if character:FindFirstChild("UpperTorso") and character:FindFirstChild("Head") then
		local TorsoLookVector = Torso.CFrame.lookVector
		local HeadPosition = Head.CFrame.p

		if Neck and Waist then
			if Camera.CameraSubject:IsDescendantOf(character) or Camera.CameraSubject:IsDescendantOf(player) then
				local Point = getPoint();

				local Distance = (Head.CFrame.p - Point).magnitude
				local Difference = Head.CFrame.Y - Point.Y

				Neck.C0 = Neck.C0:lerp(NeckOriginC0 * CFrame.Angles(-(math.atan(Difference / Distance) * 0.5), (((HeadPosition - Point).Unit):Cross(TorsoLookVector)).Y * 1, 0), 0.5 / 2)
				Waist.C0 = Waist.C0:lerp(WaistOriginC0 * CFrame.Angles(-(math.atan(Difference / Distance) * 0.5), (((HeadPosition - Point).Unit):Cross(TorsoLookVector)).Y * 0.5, 0), 0.5 / 2)
			end
		end
	end	
	
	local camCF = camera.CoordinateFrame
	local distance = (character.Head.Position - camCF.p).magnitude
	if distance <= 2 and humanoid.Health ~= 0 then
		rightShoulder.C0 = rightShoulder.C0:lerp((camCF * currentC0Right * CFrame.new(0,-1.5,0)):toObjectSpace(torso.CFrame):inverse() , updateSpeed)
		leftShoulder.C0 = leftShoulder.C0:lerp((camCF * currentC0Left * CFrame.new(0,-1.5,0)):toObjectSpace(torso.CFrame):inverse() , updateSpeed)
	else
		rightShoulder.C0 = currentC0Right
		leftShoulder.C0 = currentC0Left
	end
end)

If you need me to explain the code I can. Place this in starter character scripts. Although you should probably alter it and put it somewhere else.

Also one more thing to note there will some slight delays and you can fix this with dt. I can also help you on that if you need.

And thanks :slight_smile:

It’s fine!

BUT… it doesn’t visibly work.
All it does for me is alter the body.

Can you send a video please? Also I just realized how messy the code is so I’ll try revising it. Also are you in R15 or R6?