I have searched far and wide for a video or a tutorial that could help me fix this issue but I cannot for the life of me find one. My issue is that I wish to have a part that when touched teleports you to a place (not a different starter place). However, it just doesn’t seem to be working. I’ve put my code along with a video below.
Code:
local TeleportService = game:GetService("TeleportService")
local Place = 12896426437
script.Parent.Touched:connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
TeleportService:Teleport(Place, player)
end
end)
Video:
https://gyazo.com/e6229ef4855b6a9c5e18bcaa308abe9f
The part that contains the script in the video is transparent underneath the portal.
I’ve tried everything from making the part visible to adding different types of infinite loops (some of them crash the game) in the code. I also can’t find the issue inside Roblox studio because all the output says is that it can’t teleport to another place inside studio. This teleportation feature is basically what the game is based around and it sucks that the code that does it just doesn’t work.