-- помести local скрипт в парт
local Players = game:GetService("Players")
local part = script.Parent -- путь к парту
if part then
part.Touched:Connect(function(otherPart)
local player = Players:GetPlayerFromCharacter(otherPart.Parent)
if player then
local gui = player.PlayerGui.ScreenGui -- путь к гуи через PlayerGui (только не через game.StarterGui)
if gui then
gui:Destroy()
end
end
end)
end