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

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

Asked by 4 years ago
Edited 4 years ago

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
0
info is a table value, you can only concatenate strings. That's what concatenation is. pidgey 548 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

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:"

Ad

Answer this question