#How would i detect if the player is holding down right click?
51 messages · Page 1 of 1 (latest)
this is what i tried:
while task.wait() do
if Mouse.Button2Down then
GetObjectFromMouse()
end
end
and yes GetObjectFromMouse is a working function and yes the mouse is refrenced properly
Button2Down is an event
so you can listen to that and up and make your own bool
or you use an alternative
local down = false
Mouse.Button2Down:Connect(function()
down = true
end)
mouse.Button2Up:Connect(function()
down = false
end)
Yeah i knew it probs wouldnt work but i just wanted to give it a shot, since they removed it from userinputservice i really didnt think of any other way
Smart, lemme try that rq
Pretty sure they removed it since they have been wanting to switch it over fully to Player:GetMouse(), they talked alot about depricating it
And nothing appears when i type it in
What im saying is im sure they fully deprecated the mouse from uis
only can use it with player:getmouse
ide doubt they would remove it from cas
but they have been deprecating alot of shit lately
what
well they probably won't remove the mouse, but you should abide by current standards when making new code
exactly
either im coding it wrong but i cant get the mouse from uis at all
tried that g
enum.keycode doesnt contain mouse stuff unless ide have to use enum.inputtype
for example use UIS.InputChanged
has mouse
UserInputType.MousButton2 is not a thing
wait nvm
nah i put input type
didnt put userinputtype
doesnt matter anyways since its been solved for an hour just forgot to put the tag on
yeah but like homeboy said its better to use the newer stuff that isnt gonna get deprecated
i prefer player:getmouse since i can use the .hit and the .target
yeah it's easier
it has alot of stuff you cant do with uis
what
why would the camera have anything to do with the mouse
you can do everything with the alternatives
you don't need mouse
that's why they were able to deprecate it
it just has certain shortcuts they alternatives don't
screen point to world position
o he talking about the alternitives to .hit and .target
mhm
or you could use raycasts if you wanna get more advanced
o
yeah ive never used it before
one thing about .hit or .target is the range on them is ass