Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How Can I Connect IntValue With String?

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

✓ Accepted answer

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)

2 comments

0

solution 3? wheres solution 2

0

typo LOL

This discussion is preserved as it was. New answers, comments, and votes are closed.