Basically i'm trying to script a door that opens and closes based on the player's mouse movement. If the mouse's Y position goes up, then the door opens a little... etc...
The problem is I don't know if I should be using a GUI to detect the Mouse's Y position, or if I should be using Rays. If it's rays then imma need some help. I've never used rays before, and they seem.... intimidating....
I don't have any example script to show since i'm still stuck on this situation.
You can local the mouse with using :GetMouse
. Also, you can just get the Mouse X axis and Y axis by simply do :GetMouse.X
or :GetMouse.Y
. Besides, we don't need to use GUI or rays. Because they're not suited to this situation anyways, let get right into the script.
Let use Mouse's X-axis to do an example...
local screengui = Instance.new("ScreenGui", StarterGui) local textlabel = Instance.new("TextLabel", screengui) while wait() do textlabel.Text = "Current Mouse X-axis: ".. game:GetMouse().X end
Ok, I think you can figure out how this script works, scripting helpers isn't giving the answer, you need to think about it.
If you have more questions, comment below, or PM me in my ROBLOX profile! I'll be glad to help you in anytime. Bye bye~