Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you make ClickDetectors only respond to right clicks?

Asked by 7 years ago

It's the question

part.ClickDetector.MouseClick:connect(ExplodePart) -- part has a clickdetector inside it

How do you make it so it only responds to rightclicks?

1 answer

Log in to vote
0
Answered by 7 years ago

You can't right click a ClickDetector but you can use things such as mouse E.G

player = game.Players.LocalPlayer
Mouse = player:GetMouse()

Mouse.Button2Down:connect(function()
          if Mouse.Target == workspace.ClickMe then
  end
end)

Ad

Answer this question