Hey there, I’ve hit a roadblock and have searched for about a few hours now and I’m not finding anything particularly useful.
I’m trying to get the players Right Hand with a tool so I can mount a Motor6D’s Part0 attachment to the players Right Hand using a local script inside the tool.
For right now, I’m just trying to get the player’s hand just so I can understand what to utilize once it comes to the function.
Here is my current work, it is saying that there is an Infinite yield when attempting to retrieve the hand’s information. Not sure how to get around this other than using the method I have displayed.
local players = game:GetService("Players")
local player = players.LocalPlayer
local character = player.Character
if not character or not character.Parent then
character = player.CharacterAdded:Wait()
end
if character then
print("Successful. - " ..character.Name)
end
local hand = character:WaitForChild("RightHand")
if hand then
print("Successful. - " ..hand.Name)
end
Mmhh so weird. I pasted your code as a local script in character scripts, and it found the player’s hand and printed it in output succesfuly…
And I did this in a local script inside a tool and works too:
local tool = script.Parent
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
tool.Equipped:Connect(function()
warn(character:FindFirstChild("RightHand"))
end)