I am working on an SCP game, and I am making an admin event that is only pressable by admins. The script I have will not work, here is the script:
function onClick(click)
local group = script.Parent.Parent.Parent
if click.TeamColor == BrickColor.new("Lime green") then
local GasPart = game.Workspace.LCZdecon
local doubleparent = script.Parent.Parent
--Sounds
doubleparent.min1:Play()
wait(30)
doubleparent.sec30:Play()
wait(38)
doubleparent.Begun:Play()
--Gas and killpart
GasPart.Part1.Smoke.Enabled = true
GasPart.Part2.Smoke.Enabled = true
GasPart.Part3.Smoke.Enabled = true
GasPart.Part4.Smoke.Enabled = true
GasPart.Part5.Smoke.Enabled = true
GasPart.Part6.Smoke.Enabled = true
GasPart.Part7.Smoke.Enabled = true
GasPart.Part8.Smoke.Enabled = true
GasPart.Part9.Smoke.Enabled = true
GasPart.Part10.Smoke.Enabled = true
GasPart.Part11.Smoke.Enabled = true
GasPart.Part12.Smoke.Enabled = true
GasPart.Part13.Smoke.Enabled = true
GasPart.Part14.Smoke.Enabled = true
GasPart.KillPart.Script.Disabled = false
GasPart.KillPart.CanTouch = true
print("Decontamination Engaged by admin")
else
print("Unauthorized player attempted to activate decontamination.")
end
end
script.Parent.MouseClick:Connect(onClick)
If anyone can help I would appreciate it.
