Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Trying to teleport to a private server but getting an error. Help?

I'm trying to teleport one player to a private server, but I keep getting the error unable to cast value to objects and have not found a solution. Here is the server script.


script.Parent.Touched:Connect(function(hit)
	local ts = game:GetService("TeleportService")
	local Server = ts:ReserveServer(6068467327)
	local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	local plr = {}
	table.insert(plr, player)
	if hit.Parent.Humanoid then
		ts:TeleportToPrivateServer(6068467327,Server,{plr}) --error coming from this line
	end	

end)

3 comments

0

i dont think u can tp to private servers

0

yes u can

0

so please is there any fix to this?

1 answer

This is a good question.

There is already a scripting help question like this, you can check it out here! In the future, please check if there is already an answer before you post stuff like this.

https://scriptinghelpers.org/questions/102468/how-to-use-reserved-servers

1 comment

0

The script that you gave me teleports all players in game I'm trying to teleport one player but I'm getting an error saying "Unable to cast value to objects".

This discussion is preserved as it was. New answers, comments, and votes are closed.