script.Parent.MouseButton1Click:connect(function()
if currency.Value >=100 and not player.Backpack:FindFirstChild('GravityCoil')or player.Character:FindFirstChild('GravityCoil')then
currency.Value = currency.Value - amount
local newtool = tool:Clone()
newtool.parent = player.Backpack -- this line is were it says the error is
else
script.Parent.Text = "Purchase Failed, Try again later"
wait(0.5)
script.Parent.Text = indextext
end
end)
the error it gives in out put is this 22:13:59.127 - parent is not a valid member of Tool if you see a mistake please tell me.
when i click on the button it takes the money but doesn't give me the gravitycoil. the gravitycoil is in serverstorage

3 comments
newtool.Parent
Capitalize the "p" in "parent".
wow dident see that thank you. :)