Hey there! Very amateur scripter who knows basic stuff and mainly uses youtube tutorials to make scripts! I'm having a bit of trouble getting this one to work. It doesn't properly run despite not having any noticeable flaws in ROBLOX studio, can anybody help me out with this?
local placeID_1 = 6305834065
local TeleportService = game:GetService("TeleportService")
local Owner = "FrigidusIncendium, Strawberrymlqq"
local function onPartTouch(otherPart)
script.Parent.Touched:Connect(onPartTouch)
local player = game.Players:GetPlayerFromCharacter(otherPart.Parent)
if player == Owner then
TeleportService:Teleport(placeID_1, player)
end
end
Thanks!

3 comments
What is it supposed to do?
Script is supposed to detect whether or not either of the two players are touching the brick, then teleport them to another game
Bit of a PSA but please indent your code so we can read it properly <3