I want to destroy the player's player gui when he/she touches a brick. How would I do this?
You would use an argument and a if statement in your Touched function. Put the name as a string stored in the GuiName variable and make sure to put this script inside of the brick!
GuiName = "NAME OF SCREENGUI HERE" -- Put the name of the Gui here. (Caps Sensitive) function onTouched(hit) if game.Players:GetPlayerFromCharacter(hit.Parent) then if game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui:findFirstChild(GuiName) then game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui:findFirstChild(GuiName):Destroy() end end end script.Parent.Touched:connect(onTouched)