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

help please"- ServiceScriptService is not a valid member of DataModel" ?

Asked by
Fejfi 2
4 years ago

local cost = 2500

local PetModule = require(game.ServiceScriptService:WaitForChild("PetModule"))

script.Parent.ClickDetector.MouseClick:Connect(function(player)

if player.leaderstats.Cash.Value >= cost then

    player.leaderstats.Cash.Value = player.leaderstats.Cash.Value - cost


    local pet = PetModule.choseRandomPet()

    print(pet.Name.." selected")

    game.ReplicatedStorage.HatchEgg:FireClient(player,pet)

end

end)

Thanks for help

1 answer

Log in to vote
1
Answered by 4 years ago

It's ServerScriptServiceinstead of ServiceScriptService

0
Thanks Fejfi 2 — 4y
0
U can make it solved now, GL with scripting VerdommeMan 1479 — 4y
Ad

Answer this question