#holding E script not working, not able to pick up items :(
1 messages · Page 1 of 1 (latest)
line 3 in your code
its wrong
hey bro, wdym
.
im kidding
your worst error is using white mode
do you have any errors on the output?
i tried 5 different scripts none works
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