For some reason, when the player buys something from the gui shop, he is supposed to get the tool but in this case he doesn't (and yes, i put the tool in the lighting) can anyone tell me why this wont work?
Cash = script.Parent.Parent.Parent.Parent.Parent:WaitForChild("leaderstats"):WaitForChild("Credits")
function onClick()
if Cash.Value >= 50 then
Cash.Value = Cash.Value - 50
local RockLaunch = game.Lighting.EconomyClassTicket:clone()
RockLaunch.Parent = script.Parent.Parent.Parent.Parent.Parent.StarterGear
local RockLaunch = game.Lighting.EconomyClassTicket:clone()
RockLaunch.Parent = script.Parent.Parent.Parent.Parent.Parent.Backpack
RockLaunch.Handle.Anchored = false
end
end
script.Parent.MouseButton1Click:connect(onClick)

1 comment
Make 'Clone()' capital, like that.