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

How do I give myself money for testing my small project? [ANSWERED]

I'm not the most experienced scripter by any means. I was only trying to test a money system for my small game that I was going to make. It wouldn't work though. This is what I did:

-- My Personal Money
game.Players.PlayerAdded:Connect(function()
	Player.CharacterAdded:Connect(function()
		if Player.Name == "Zvtu" then
			game.Players.Zvtu.Cash.leaderstats.Value = 99999999
		end
	end)
end)

Any suggestions? ????

1 answer

✓ Accepted answer

i found your problem you put Zvtu.cash.leaderstats and you forgot to put player in game.Players.PlayerAdded:Connect(function)

so your script would be:

game.Players.PlayerAdded:Connect(function(player) -- knows a player joined
    player.CharacterAdded:Connect(function()
        if player.Name == "Zvtu" then -- this checks the player is in the game
            game.Players.Zvtu.leaderstats.Cash.Value = 99999999 -- the thing you got wrong was you put cash.leaderstats
        end
    end)
end)

Hope this helps :)

1 comment

0

Thanks mate. I should have noticed my mistakes. Have a good day!

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