So I want when the player has 100 coins (leaderstat) and if they click this gui button they will get the pet and if they dont have the amount of money it will print "Need more cash" but its not working! and I dont see any errors
local pet = game.Lighting.Pet2:Clone()
local plr = game.Players.LocalPlayer
local cash = script.Parent.Parent.Parent.Parent.leaderstats:WaitForChild("Coins")
script.Parent.MouseButton1Click:Connect(function()
if cash.Value == 100 then
pet.Parent = plr.Character
else
print("Need more cash!")
end
end)

1 comment
Thanks!