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

ReserveServer via chat not working?

Asked by 5 years ago
Edited 5 years ago

After going on the ReserveServer page on the Developer Hub, I decided to tried to recreate what happens in Airplane where people in a specific area get teleported onto a reserved server. But first, I'm trying to make it by chat (It told you how to do it on the ReserveServer Page).

This is what I have so far, but it isn't working.

*Note 1: This is a normal script in Workspace. *Note 2: This is directly copied from the Reserve Server Page except for Lines 8, 9, 10, 18, and 19.

01local TS = game:GetService("TeleportService")
02local Players = game:GetService("Players")
03local DSS = game:GetService("DataStoreService")
04local DS = DSS:GetGlobalDataStore()
05 
06-- Get the saved code
07local code = DS:GetAsync("ReservedServer")
08if type(code) ~= "create" then -- None saved, create one
09    print("Yes")
10    code = TS:ReserveServer(4066874124)
11    DS:SetAsync("ReservedServer",code)
12end
13 
14local function Joined(plr)
15    -- Everytime they chat, we want to know
View all 28 lines...

Help is greatly appreciated.

1 answer

Log in to vote
-1
Answered by
sasial 26
5 years ago
Edited 5 years ago

Are there any errors?

What's not working?

Please provide more detail.

1
If you are not posting an explanation please comment instead. Lucke0051 165 — 5y
Ad

Answer this question