1 | local Part = script.Parent |
2 | Part.Touched:connect( function (hit) |
3 | local Player = game.Players:GetPlayerFromCharacter(hit.Parent) |
4 | If Player then |
5 | Player.Backpack:ClearAllChildren() |
6 | end |
7 | end ) |
1 | local Part = script.Parent |
2 | Part.Touched:connect( function (hit) |
3 | local Player = game.Players:GetPlayerFromCharacter(hit.Parent) |
4 | if Player then -- 'if' starts with a lower case |
5 | Player.Backpack:ClearAllChildren() |
6 | end |
7 | end ) |