This is currently what I have right now
id = 364386074 TeleportService = game:GetService("TeleportService") local holo = game.Workspace:FindFirstChild("Holo") holo.SurfaceGui.ImageButton.MouseButton1Click:connect(function(plr) TeleportService:Teleport(id, plr) end)
This does work in PlayTest, however, whenever I start up a server, it gives me the error that it attempted to index local holo (a nil value). This error doesn't really make sense to me, if someone can explain and help me make this script work that'd be great.
Also this is a LocalScript inside StarterPack.
The most likely problem is that the Holo part is not loaded in yet when the script first runs. To fix this, you can try using WaitForChild.
local id = 364386074 local TeleportService = game:GetService("TeleportService") local holo = game.Workspace:WaitForChild("Holo") holo.SurfaceGui.ImageButton.MouseButton1Click:connect(function(plr) TeleportService:Teleport(id, plr) end)