-
What do you want to achieve?
so i was making a reserve server join gui .
-
What is the issue?
for some reason , the server just keep getting error and i dont even know whats the
problem . -
What solutions have you tried so far?
Server Script
local TeleportService = game:GetService("TeleportService")
local placeId = 6991639717
local TargetPlaceId = 7393896152
local GeneratedCode = TeleportService:ReserveServer(TargetPlaceId)
--Settings // Make the code shorter
local Digit = math.random(1,999999)
local FullCode = tostring(GeneratedCode.."-%-"..Digit)
local SplitCode = string.split(FullCode, "-%-")
print(SplitCode.." Code For Reserve Server ")
RemoteEvent.OnServerEvent:Connect(function(player, Code, SaveCode)
if Code == "" then
SaveCode = tostring(SplitCode)
print("Code Successfully Saved !")
TeleportService:TeleportToPrivateServer(7393896152, SplitCode, player)
else
TeleportService:TeleportToPrivateServer(7393896152, Code, player)
end
end)
Local Script
local TextBox = script.Parent
local Button = script.Parent.Parent.JoinButton
local RemoteEvent = game.ReplicatedStorage:WaitForChild("RemoteServer").JoinReserveServer
local SaveCode = game.Players.LocalPlayer.CodeServer -- // the reserve server code saved in player datastore
Button.MouseButton1Click:Connect(function()
RemoteEvent:FireServer(TextBox.Text, SaveCode.Value)
end)
Here is a screenshot of the error

i dont think i make the shorten code script correct , for some reason it keep printing something like this .
table : xx1ihi1h1nb237
i didnt even type table in front .