I made a game sort of like Innovation Inc Spaceship.
I want to make it so that the Pod Endings are possible. I can get as far as getting the names of players inside of pods, but how exactly do I teleport them to another place? Here's my code so far.
if pod.Name == "Pod" then local pfft = planets -- planets is set earlier as the place id of the target planet print("Test Successful on first stage") for lol, seat in pairs(pod:GetChildren()) do if seat.Name == "Seat" then print("Test Successful on second stage") local weld = seat:FindFirstChild("SeatWeld") if weld then print("Test Successful on third stage") local humanoidroot = weld.Part1 local playerName = humanoidroot.Parent.Name print(playerName) print(humanoidroot) -- Get player from characte -- Teleport the player TeleportToPlaceInstance(pfft, playerName) print("Test Successful on final stage") end end end end
It just complains about "calling null".