Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

It's ServerScriptServiceinstead of ServiceScriptService

2 comments

0

Thanks

0

U can make it solved now, GL with scripting

This discussion is preserved as it was. New answers, comments, and votes are closed.