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

Why Doesnt This Work? Please Help!Please...

Asked by 10 years ago
Workspace.ChildRemoved:connect(function(child)
        script.Parent.Text = "Someone Named, "..child.Name..", Left the Server"
        print(child.Name)
end)

WHY???

2 answers

Log in to vote
0
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
10 years ago

Instead of focusing on Workspace, focus on Players... Use the PlayerRemoving event.

game.Players.PlayerRemoving:connect(function(player)
    script.Parent.Text = player.Name.." has left the server."
end)
Ad
Log in to vote
0
Answered by 10 years ago

Put this in a LocalScript

child = game.Players.LocalPlayer
game.Players.PlayerRemoving:connect(function()
    script.Parent.Text = "Someone named, "..child.Name..", left the Server"
end)

Answer this question