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

How do I detect a change in the input?

Asked by
wazap 100
9 years ago

For UserInputService

I have already tried

game:GetService("UserInputService").InputChanged:connect(function(input)
    if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType.MouseMovement then
        local delta = input.Delta
        plane.BodyVelocity.velocity = plane.BodyVelocity.velocity-delta
end
end)

However, this is extremely glitchy, taking about 4 seconds to respond under constant motion. Am I even using delta properly

Any other ideas :/

Answer this question