So basically, I want it so when I click a brick, I can get the player.
script.Parent.ClickDetector.MouseClick:connect(function(plr)
a = game.Players:GetPlayerFromCharacter(plr)
a:Destroy()
end)
I have also tried this.
script.Parent.ClickDetector.MouseClick:connect(function(plr)
local a = game.Players:GetPlayerFromCharacter(plr)
a:Destroy()
end)

1 comment
use this instead "local character = plr.Character if character ~= nil then character:Destroy()"