So as I am making a Zoom Script for a Weapon I was wondering how to make Right Click the button to zoom? I got it all down but right now it is ~~~~~~~~~~~~~~~~~ if key == "z" then ~~~~~~~~~~~~~~~~~ If I wanted to turn that into right click rather then Z, how would I do that? Would I put Rmb? Or maybe RightC? What do I put to make it Right click rather then the Z key. Help is very much appreciated.
Put in a local script in starterpack.
local mouse = game.Players.LocalPlayer:GetMouse(); -- get mouse mouse.Button2Down:connect(function() print("click") end)
I apologize for the code not working. It was supposed to be.
if key == "z" then