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

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

Asked by 9 years ago
1game.Players.PlayerAdded:connect(function(plr)
2    if plr then
3        local mplayer = game.Players.LocalPlayer.Player
4        if mplayer then
5            mplayer.PlayerGui.Cash.TextLabel = "100$"
6        end
7        end
8end)

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

Log in to vote
0
Answered by 9 years ago

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

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

You also forgot .Text for the TextLabel

Ad

Answer this question