i want it so that when a player touches it it teleportes them to game id?
p = Instance.new('Part')
p.Parent = game.Workspace
p.Anchored = true
p.CanCollide = false
p.Size = Vector3.new(10, 10, 10)
p.Transparency = 0
p.Position = Vector3.new(0,0,0)
wait()
target = CFrame.new(p.Position)
wait()
script:Clone()
function onTouched(hit)
print('Teleported.')
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
game:GetService("TeleportService"):Teleport(1898087053, player) --The numbers are place id. You can put whatever place id you want.
end
end
p.Touched:connect(onTouched)
for i, player in ipairs(game.Players:GetChildren()) do
player.Character.Torso.CFrame = target + Vector3.new(0, i * 10, 0)
end

2 comments
Whats wrong with it? You never really said.
connect is deprecated. Instead, use Connect with a capital C.