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

How do I change this to give a Hat, Instead of a Gear, and move it to the Player's Head?

Asked by 9 years ago
wait(0.5)
player = script.Parent.Parent.Parent.Parent.Parent
money = player.leaderstats.Money
price = 600
tool = game.Lighting:findFirstChild("Name of weapon here") --Exact Name
--Having Trouble here

function buy()
if money.Value >= price then
money.Value = money.Value - price
local a = tool:clone()--Having Trouble here
a.Parent = player.Backpack--Having Trouble here
local b = tool:clone()--Having Trouble here
b.Parent = player.StarterGear--Having Trouble here

end
end
script.Parent.MouseButton1Down:connect(buy)

Answer this question