local deb = false
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if deb == true then return end
deb = true
wait()
local a = game.Players:GetPlayerFromCharacter(hit.Parent)
repeat wait() until a:FindFirstChild("PlayerGui")
local b = a.PlayerGui:GetChildren()
for i=1, #b do
if b[i].className == "ScreenGui" then
return end
end
script.Parent.CanCollide = false
end
deb = false
end)
It checks to see if the player touching it has any guis inside him. If he doesn't, the brick becomes noncancollide. It works in solo but not in server for some reason.
