I am trying to make a screengui button which will send the player to a reserved server (remote event), when clicking that button it throws Unable to cast value to Objects error
Am I getting the player incorrectly or something??
Here’s what I have so far:
game.ReplicatedStorage:WaitForChild("solo").OnServerEvent:Connect(function(player)
local TS = game:GetService("TeleportService")
local code = TS:ReserveServer(6667553755)
TS:TeleportToPrivateServer(6667553755,code,player) -- error happens here
end)