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)
What are you doing?
ClickDetector would already define the player for you, you don't need to use :GetPlayerFromCharacter, that's for other functions like onTouch, and et cetera.
Learn more about ClickDetector here: http://wiki.roblox.com/index.php?title=API:Class/ClickDetector/MouseClick
script.Parent.ClickDetector.MouseClick:connect(function(plr) plr:Destroy() end)