Hello! Im trying to make it so when the player touches a part they will be teleported to another place inside the game (" I Mean teleporting through places ") But when I touch the part it doesnt do anything, I entered the code then touched the teleporter THEN Inside the Output this happened
14:32:04.170 The Oof Box Factory auto-recovery file was created - Studio - C:/Users/mrtix/Documents/ROBLOX/AutoSaves
14:32:14.163 ▶ 0 (x4) - Server - MasterScript:80
14:32:16.963 Entered - Server - MasterScript:23
14:32:18.232 ▶ exception while signaling: Cannot Teleport in the Roblox Studio. (x41) - Studio
Im in maximum confusion right now here’s the script.
local TeleportService = game:GetService("TeleportService")
local TeleportDestination = 6264488550
local function onPartTouch(otherPart)
local player = game.Players:GetPlayerFromCharacter(otherPart.Parent)
if player then
TeleportService:Teleport(TeleportDestination, player)
end
end
script.Parent.Touched:Connect(onPartTouch)