#holding E script not working, not able to pick up items :(

1 messages · Page 1 of 1 (latest)

woeful grove
#

holding E script not working, not able to pick up items 🙁

verbal vine
#

its wrong

woeful grove
#

hey bro, wdym

woeful grove
verbal vine
#

im kidding

low obsidian
#

do you have any errors on the output?

woeful grove
upbeat trout
#

local tool = script.Parent
local player = nil
local character = nil
local humanoid = nil
local weld = nil

tool.Equipped:Connect(function()
player = game.Players:GetPlayerFromCharacter(tool.Parent)
character = player.Character
humanoid = character:FindFirstChildOfClass("Humanoid")

if not weld then
    weld = Instance.new("WeldConstraint")
    weld.Part0 = tool.PrimaryPart
    weld.Part1 = character:WaitForChild("RightHand")
    weld.Parent = tool.PrimaryPart
end

tool.PrimaryPart.CFrame = character.RightHand.CFrame

end)

tool.Unequipped:Connect(function()
if weld then
weld:Destroy()
weld = nil
end
end)

#

Try this

#

Make sure script is inside tool and everything is named properly

hearty osprey
#

turn it to dark mode

#

also any errors?