So I've been trying to get this to work all day. I am seething with rage right now. I am ready to launch my game, but cannot because of this. I need it to work once a brick is clicked. I made the part, put the click detector in it, and this is the bit of the script I already have:
function ClickTime(Plyr)
for i,v in pairs(Players:GetPlayers()) do
v.Character:BreakJoints()
end
end
script.Parent.ClickDetector.MouseClick:connect(ClickTime)
However, that didn't work, and It didn't change the teams(Because I still don't know how to do that). So then I tried this:
local detect = script.Parent.ClickDetector -- Assuming the script is within a part, and the part has a ClickDetector in it
function kill()
for i, v in pairs(game.Players:getPlayers()) do
v.Character:breakJoints()
end
detect.MouseClick:connect(kill)
And that didn't work either. If someone can help me make these scripts kill all, that would be great. And if you need to know the teams, they are: "Really red" "Bright blue" "Bright yellow" And I am trying to change the teams to yellow.

1 comment
Thank you!