I'm trying to make a script where if a Player clicked on a part(TeleDoor), it'd teleport them to another place:
game.Workspace.TeleDoor.onClicked.ClickDetector( game:GetService("TeleportService"):Teleport(154300059, game.Players.LocalPlayer.Character) )
I think this script is wrong, but then again, I don't because it doesn't have a red line under it... Help?
Just because there is no red line doesn't mean that the script will be guaranteed to work.
This is a script inside the ClickDetector inside the 'TeleDoor'
local function onMouseClick(Player) game:GetService("TeleportService"):Teleport(154300059,Player) end script.Parent.MouseClick:connect(onMouseClick)