Hi! I am working on a script that equips a tool and removes a weld. It equips in Roblox Studio and gives an error 'Weld is not a valid member of Backpack'.

Here is an example of the Explorer: gyazo.com/a7936ffca652a624d5446eb1d1613972

Here is the code:

script.Parent.Parent.Parent.Weld.TopSurface = 'Smooth'

local player = game.Players.LocalPlayer

function onClicked(playerWhoClicked)
local copy = game.Workspace.Bottle.WaterBottle:Clone()
copy.Parent = game.Players.LocalPlayer.Backpack
end
 
script.Parent.ClickDetector.MouseClick:connect(onClicked)

Help D:

2 comments

0

When you equip a tool, the tool's parent becomes the Player's Backpack. Not sure what the weld is for, so I can't give you a specific answer, but feel free to ask more questions if you have some.

0

WaitForChild?