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

Teleport Service Error?

Asked by
22ron 0
8 years ago

Here is my code

local event = Instance.new("RemoteEvent")
event.Parent = game.Workspace 
event.Name = "SendPlayersToGame" 
local TS = game:GetService("TeleportService")
event.OnServerEvent:connect(function(PlaceID,Code,Players)
Code = TS:ReserveServer(Code)
TS:TeleportToPrivateServer(PlaceID,Code,Players)
end)

In a local script I send a random code the players I wan't sent in a list and the place ID I want them sent to but I get this error

Unable to cast instance to int, Line 7

1 answer

Log in to vote
1
Answered by 8 years ago

Where do you specify the PlaceID?

0
In the local script that fires the remote function 22ron 0 — 8y
Ad

Answer this question