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

PlayerGui.ScreenGui.Frame.LocalScript:3: attempt to concatenate local 'info' (a table value) ?

I do not understand what the error is...

local info = game.ReplicatedStorage.musicEvents.getSong:InvokeServer()
if info ~= nil then
   script.Parent.TextLabel.Text = "Now Playing: " .. info
end

1 comment

0

info is a table value, you can only concatenate strings. That's what concatenation is.

1 answer

The info being returned by your InvokeServer is a table. In order to use info combined with "Now Playing:", you need to have it a string. When you're returning your info, set that to be a string. If info is return {"song name"}, change that to return {name="song name"} and use info.name to combine with "Now Playing:"

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