I have a textLabel that I am gonna use to show people their FPS - Frames Per Second in the game, I want it so whatever the string of FPS is the string of textLabel is too, I don't know how to do this but wrote attempt codes here:
local textLabel = Instance.new("TextLabel")
textLabel.Parent = screenGui
textLabel.Position = UDim2.new(0, 1450, 0, 700)
textLabel.Size = UDim2.new(0, 100, 0, 80)
textLabel.BackgroundColor3 = BrickColor.Black().Color
textLabel.Text = "0"
textLabel.Font = "Legacy"
textLabel.FontSize = 9
textLabel.TextColor3 = BrickColor.White().Color
textLabel.BorderColor3 = BrickColor.White().Color
NewInformation = "XYZ"
if game.Workspace.FPS == "XYZ" then
textLabel.Text = "XYZ"
end
and
local textLabel = Instance.new("TextLabel")
textLabel.Parent = screenGui
textLabel.Position = UDim2.new(0, 1450, 0, 700)
textLabel.Size = UDim2.new(0, 100, 0, 80)
textLabel.BackgroundColor3 = BrickColor.Black().Color
textLabel.Text = "0"
textLabel.Font = "Legacy"
textLabel.FontSize = 9
textLabel.TextColor3 = BrickColor.White().Color
textLabel.BorderColor3 = BrickColor.White().Color
if game.Workspace.FPS == "59.9" or "60" then
textLabel.Text = "60"
end
But the problem is I don't think that is how you locate the game's FPS and I don't think that is how you put the string on the textLabel, I honestly have no idea can you guys help me?

3 comments
How do I get a Clientside Script and where do I put it? :/
What we often call a "clientside script" is a LocalScript object. LocalScripts are executed on the client, that is, a player's computer. Hence their name. Similarly, we also call regular Scripts "serverside script", because they are executed on the server itself; the computer at the Roblox HQ that hosts the game.
As for where to put it, it depends really. But I would suggest putting it in a pre-existing gui, located in StarterGui, instead of creating the gui (including the TextLabel) at runtime.