i made a clickdetector and parented it to every players torso. im trying to detect when a player clicks another players click detector. i tried some things but i cant really get it to work. any ideas? ty
for i, char in workspace:GetChildren() do
if char:IsA("Model") then
local plr = game.Players:GetPlayerFromCharacter(char)
if plr then
char.Torso.charCD.MouseClick:Connect(function(plrwhoClicked)
print(plrwhoClicked.Name)
end)
end
end
end
i did that at first and it wasnt working. i did a print statement to see if it was working and it wasnt and i was like “why isnt this working”. i forgot to look at the output on the server. tysm man!