How can I detect the person that clicks the ClickDetector brick?
This is what I thought but I was wrong...
local owner = script.Parent.Parent.Parent.Parent.OwnerName.Value
function onClicked(owner)
How can I detect the person that clicks the ClickDetector brick?
This is what I thought but I was wrong...
local owner = script.Parent.Parent.Parent.Parent.OwnerName.Value
function onClicked(owner)
The MouseClick event in a ClickDetector yields an argument for the player who clicked the brick. Example-
detect = script.Parent.ClickDetector
detect.MouseClick:connect(function(player)
player.TeamColor = BrickColor.new("Bright blue")
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.