#Introduction
I'm creating a script where when a player presses E next to a tree, it will play a chop animation, freeze them, and weld an axe to their hand.
However, I don't know how I would do that.
#Script
Oh yeah, here's my script for reference.
local player = game.Players.PlayerAdded:Wait()
local character = player.Character or player.CharacterAdded:Wait()
while not character.Parent do
character.AncestryChanged:Wait()
end
local Humanoid = character:WaitForChild('Humanoid')
local HRP = character:WaitForChild('HumanoidRootPart')
local mouse = player:GetMouse()
local Anim = Instance.new("Animation",script.Parent)
Anim.Name = "ChopAnim"
Anim.AnimationId = 'rbxassetid://3027147369'
local Animation = Humanoid:LoadAnimation(Anim)
local Part = script.Parent
print(Tool.Name)
game.ReplicatedStorage.PressedE.OnServerEvent:Connect(function()
if (HRP.Position - Part.Position).magnitude < 4.5 then
if player.PlayerGui:WaitForChild('Job').Value == "Lumberjack" then
--weld over here
end
end
end)
#Conclusion / Problem
Note: The axe is in the ReplicatedStorage and the PressedE RemoteEvent is in ReplicatedStorage.
Can someone teach me how I would weld a tool to the player's right hand? Thanks if you reply!
Regards, Sensei_Developer

2 comments
Okay, I'll try it.
Nope. Doesn't work...