Hi i made a script to get the server ip
local id = require script.Parent.Text = "Server Ip:" .. id
but that don't work and the output is
11:42:28.866 - workspace.Folder.Name = require:1: bad argument #3 to 'Name' (string expected, got function) 11:42:28.869 - Stack Begin 11:42:28.872 - Script 'workspace.Folder.Name = require', Line 1 11:42:28.874 - Stack End
You shouldn't need the server ip. However, for use in TeleportService
, you might want game.JobId.
require
simply requires a ModuleScript and returns the table/object returned by that ModuleScript. ex, you could do local Class = require(workspace.Class)
, assuming workspace.Class is a ModuleScript that returns a table representing "Class".