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

Why is this not making the player start with 100$?

game.Players.PlayerAdded:connect(function(plr)
	if plr then
		local mplayer = game.Players.LocalPlayer.Player
		if mplayer then
			mplayer.PlayerGui.Cash.TextLabel = "100$"
		end
		end
end)

It is supposed to make a player join with 100$. The 100$ is a text label in a gui and this script won't work I can't find where I went wrong.

1 answer

✓ Accepted answer

Tip: you don't need to create a LocalPlayer part. This script should work just fine

game.Players.PlayerAdded:connect(function(plr)
    if plr then
            plr.PlayerGui.Cash.TextLabel.Text = "100$"
        end
end)

You also forgot .Text for the TextLabel

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