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

How Can I Connect IntValue With String?

Asked by 5 years ago

I want to show number with text on TextLabel.

I'm Using Code Recently:

game.Workspace.GSTime.Changed:Connect(function()

    script.Parent.Text = (game.Workspace.GSTime.Value "Seconds")

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.

1 answer

Log in to vote
0
Answered by 5 years ago

well, there are multiple solutions to this answer:

solution 1: use table.concat()

game.Workspace.GSTime.Changed:Connect(function()

    script.Parent.Text = table.concat({tostring(game.Workspace.GSTime.Value, "Seconds"})

end)

solution 3: use .. operator


game.Workspace.GSTime.Changed:Connect(function() script.Parent.Text = game.Workspace.GSTime.Value.." Seconds" end)
0
solution 3? wheres solution 2 moo1210 587 — 5y
0
typo LOL User#23252 26 — 5y
Ad

Answer this question