This is the script and I'm just watching a tutorial but it ain't working help???
How to fix, please???
local cost = 500
local PetModule = require(game.ServerScriptService:WaitForChild("PetModule"))
script.Parent.ClickDetector.MouseClick:connect(function(player)
if player.leaderstats.Cash.Value >= cost then
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value - 500
local pet = PetModule.chooseRandomPet()
print(pet.Name.." selected")
end
end)
