Hi, I’m wanting to make the script / click detector below for an in-game team only, but I’m not sure where to start.
Here’s the script:
Aa = script.Parent.Aa
Ca = script.Parent.Ca
State = 1
function onclick()
if State == 1 then
for i,v in pairs(Aa:GetChildren()) do
v.CanCollide = false
v.Transparency = 1
end
for i,v in pairs(Ca:GetChildren()) do
v.CanCollide = true
v.Transparency = 0
end
State = 2
elseif State == 2 then
for i,v in pairs(Aa:GetChildren()) do
v.CanCollide = true
v.Transparency = 0
end
for i,v in pairs(Ca:GetChildren()) do
v.CanCollide = false
v.Transparency = 1
end
State = 1
end
end
script.Parent.Show1.ClickDetector.MouseClick:Connect(onclick)