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

Forcing text into caps?

Asked by 8 years ago

I am trying to make the text force in to all caps from "test" to "TEST". Here is the script I am working with, it works fine but I am just trying to get the

songt.Text = data.Name

into CAPS

for i, id in pairs(require(list)) do
    pcall(function()
        local data = market:GetProductInfo (id);
        if data and data.AssetTypeId == 3 then 
            local songt = songtext:Clone();
            songt.Parent = frame;
            songt.Position = UDim2.new(0, 0, 0, songt.AbsoluteSize.y * (i - 1));
            songt.Text = data.Name
        end
    end)
end

2 answers

Log in to vote
1
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
8 years ago

Ex is right, you just have to apply the function to what you're setting the text to.

songt.Text = data.Name

becomes,

songt.Text = string.upper( data.Name )

or, equivalently,

songt.Text = data.Name:upper()
0
Works, thank you. UnleashedGamers 257 — 8y
Ad
Log in to vote
2
Answered by
Poine 30
8 years ago

Try this.

string.Upper(songt.Text)
0
It didn't work. UnleashedGamers 257 — 8y
0
It only works when I print it. UnleashedGamers 257 — 8y

Answer this question