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

How to make a gui appear for everyone when a certain team touches a brick?

Asked by 6 years ago

So basically like someone from the 'Really black' team color brick touches this brick and because he is apart of the 'Really black' brick color team the gui sets off for everyone, and if someone from the 'Really red' team touches it nothing happens. Also when the player from the 'Really black' team walks off the brick the gui is removed for everyone.

ty for any possible help

local guipopup = script.Parent
local gui = guipopup.NOTICE
local v = guipopup.CFrame:vectorToWorldSpace(Vector3.new(guipopup.Size.X/2,guipopup.Size.Y/2,guipopup.Size.Z/2))



guipopup.Touched:connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent) 
if player and not player.PlayerGui:FindFirstChild("NOTICE") then 
local clone = gui:Clone()
clone.Parent = player.PlayerGui
while wait(1) do


not(player.Character.Torso.Position.x <= guipopup.Position.x + v.x and
player.Character.Torso.Position.x >= guipopup.Position.x - v.x and

player.Character.Torso.Position.y <= guipopup.Position.y + v.y + 18.5 and 

player.Character.Torso.Position.y >= guipopup.Position.y - v.y and 

player.Character.Torso.Position.z <= guipopup.Position.z + v.z and
player.Character.Torso.Position.z >= guipopup.Position.z - v.z)
then

clone:Destroy()
end
end
end
end)
0
I'm not gonna help you since you did not indent properly. hiimgoodpack 2009 — 6y
0
Hahahaha that's funny hiimgoodjack rilgundam 65 — 6y
0
"HimGoodJack" greatneil80 2647 — 6y
0
lol damn feelsbad Dullbuilderman26 11 — 6y

Answer this question