So im trying to make a script that shows the Y mouse position in first person so i can make a if to see how high up the mouse is so i can make arms only follow up to a certain point into air thanks for any answers. heres the idea of the script i just need the method
if (some mouse position cordinate for y) <= limit then
randomfunction()
end
First you should get the players' Mouse: local Mouse = game.Players.LocalPlayer:GetMouse()
and use Mouse.Y
to get the Mouse Y position. Note that 0 might be at the top of the screen.
Example code, Also note that you should do a loop or anything to check the Y at a period of time:
local Mouse = game.Players.LocalPlayer:GetMouse() if Mouse.Y <= limit then -- randomfunction() end
Here is the raw version:
local Mouse = game.Players.LocalPlayer:GetMouse()
if Mouse.Y <= limit then
randomfunction()
end