Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why wont a tool get picked up when clicked in Roblox Player but in Roblox Studio it works?

Asked by
thezube 10
7 years ago

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:

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. PreciseLogic 271 — 7y
0
WaitForChild? cabbler 1942 — 7y

Answer this question