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

game.Players.LocalPlayer.Name > Output: (playername).. Anyway to make that name all caps?

Asked by
kag_e 12
5 years ago

Say I have a script where when a remote is fired I want it to change the text of 2 text labels to the main players name in all CAPS, I thought of one way of doing this by splitting it and making it caps but I couldn't think of a way to do this

local charselected = game.ReplicatedStorage.charselected local mainchar = script.Parent

local function startMain(player)
    print(player.Name)
    mainchar.Enabled = true
    mainchar.nameblue.Text = player.Name
    mainchar.namewhite.Text = player.Name
end

charselected.OnServerEvent:Connect(startMain)

This is my code currently and I just want where this is

    mainchar.nameblue.Text = player.Name
    mainchar.namewhite.Text = player.Name

I want that player.Name to set the text labels text in all caps.

0
Try mainchar.nameblue.Text = string.upper(player.Name) jackfrost178 242 — 5y
0
You could also use player.Name:upper() theCJarmy7 1293 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

You are going to want to use a string manipulation called string.upper

List of all string manipulations

mainchar.nameblue.Text = string.upper(player.Name)
mainchar.namewhite.Text = string.upper(player.Name)
Ad

Answer this question