I want to show number with text on TextLabel.
I'm Using Code Recently:
1 | game.Workspace.GSTime.Changed:Connect( function () |
2 |
3 | script.Parent.Text = (game.Workspace.GSTime.Value "Seconds" ) |
4 |
5 | end ) |
when I Fired This Code Gives "Players.Infi_power.PlayerGui.ScreenGui.Frame.TimeDisplay.Script:5: attempt to call field 'Value' (a number value)" Error.
well, there are multiple solutions to this answer:
solution 1: use table.concat()
1 | game.Workspace.GSTime.Changed:Connect( function () |
2 |
3 | script.Parent.Text = table.concat( { tostring (game.Workspace.GSTime.Value, "Seconds" } ) |
4 |
5 | end ) |
solution 3: use .. operator
1 | game.Workspace.GSTime.Changed:Connect( function () |
2 |
3 | script.Parent.Text = game.Workspace.GSTime.Value.. " Seconds" |
4 |
5 | end ) |