I don't understand what is wrong. The prints work but the script doesn't.
local teleportService = game:GetService'TeleportService'
local player = script.Parent.Parent.Parent.Parent.Parent
function onClicked()
print("clicked")
script.Parent.Click:Play()
local validPlayer, targetUserId = pcall(game.Players.GetUserIdFromNameAsync, game.Players, script.Parent.Parent.Target.TextBox.Text)
if validPlayer then
local isOnline, success, errorMsg, placeId, instanceId = pcall(teleportService.GetPlayerPlaceInstanceAsync, teleportService,targetUserId)
if isOnline and success then
teleportService:TeleportToPlaceInstance(placeId, instanceId, player)
end
end
print("joined")
end
script.Parent.MouseButton1Click:connect(onClicked)
Developer Console just prints what i wanted and shows no errors.

5 comments
try it outside of studio
Why are these methods still allowed?
MCAndROBLOXUnited I did
ahhhhhhh ok I see: success, errorMsg, placeId, and instanceId are nil
The script looks very deprecated.