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

Is there a lua-equivalent to Unity's "GetAxis()"?

Asked by 3 years ago
Edited 3 years ago

Hello,

I am trying to recreate a script that was previously made in C#. The problem is that Unity has different functions than Roblox Studio has, so implementation is a bit of a challenge. During the implementation, I came across "Input.GetAxis("Horizontal")" which returns the virtual x axis value, and I cannot find a similar thing in Roblox. Is there one that is close?

Thanks!

0
Try using this : https://developer.roblox.com/en-us/api-reference/function/UserInputService/GetMouseDelta. I can find this as close as what your described in your question. I know the horizontal input in Unity and X Input of mouse is different. but, this can be an example. BestCreativeBoy 1395 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

Do you mean x position? If so then read the parts x position like this:

part.Position.X
0
also trust me, i know how challenging it is to convert another language to roblox lua. i recently recreated classic cookie clicker, which uses html, css, and ALOT of javascript testing34545 12 — 3y
Ad

Answer this question