The goal is the give a player their own spawn box, and in the workspace there is Lobby1
through Lobby10
. But the issue is, the i try to get this lobby through a value with a number, 1 - 10,i get the error : attempt to concatenate local 'lobbys' (a userdata value)
player = game.Players.LocalPlayer local spawn = script.Parent.spawn local lobbys = game.Workspace.Lobbys local locallobby = lobbys..spawn.Value wait(1) spawn.Value = game.Workspace.Values.Numspawns.Value print(locallobby) player.Character:MoveTo(Vector3.new(0,0,0))
On line 4 you're concatenating an object with a string, which will error. To fix this you'll have to change "lobbys..spawn.Value" to "lobbys.Name..spawn.Value"