Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does this script teleport other players too?

Asked by
7_Fig 0
4 years ago
game.Players.PlayerAdded:Connect(function(p)
    p.CharacterAdded:Connect(function(c)
        script.Parent:GetPropertyChangedSignal("Occupant"):Connect(function(occupied)
            wait(0.3)
             if not script.Parent.Occupant then
                c.HumanoidRootPart.CFrame = script.Parent.CFrame + Vector3.new(-3,2,0)
            end
        end)
    end)
end)

Answer this question