So ive been trying to make a script where when a player presses down the 'F' Key, The player spawns in a part. I have been trying to tell the part to position to the Right Arm in the players model but everytime I call it, it spawns to the center of the map as if I didnt call it to the players Right Arm.
vPlayer = game.Players.LocalPlayer
local character = vPlayer.Character
local _RightArm = character:FindFirstChild("Right Arm")
function onKeyPress(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.F and _RightArm then
local part = Instance.new('Part')
part.Name = 'Crow'
part:Clone().Parent = character
part.CFrame = _RightArm.CFrame
end
end
game:GetService("UserInputService").InputBegan:connect(onKeyPress)
Im not sure why it isnt detecting the RightArms position, any help would be much appreciated
This may help, But if any of you are familiar with Shinobi Life on roblox, I am basically trying to make it so when you press a key it does an action, in my case its spawning a brick in my hand.

1 comment
Accept my answer.