Driving animation

Ok, so I am doing InverseKinematics for Driving to make it realistic
So…what is better, using ContextActionService, UserInputService or mouse.Keycode
I am leaving so I get notified later

3 Likes

First. You should NEVER use mouse.KeyCode
it’s unreliable

Second. Decide if you want inputs to be on began or release
If you want the input to be on began, use UserInputService
If you want the input to be on release, use ContextActionService

show me an example of a script

local CAS = game:GetService("ContextActionService")
local UIS = game:GetService("UserInputService")

CAS:BindAction("Print", function()
    print("Hello from ContextActionService!") --prints on release
end, false, Enum.KeyCode.P)

UIS.InputBegan:Connect(function(input, chatting)
    if chatting then return end
    if input.KeyCode ~= Enum.KeyCode.P then return end
    print("Hello from UserInputService!") --prints on input, doesnt wait for release
end)

try make an IK script using UIS

On the devforum, you are not to ask people to design systems for you. You should provide a base for people to help you on

bro how you learn scripting and programming

but why mouse.Keycode unreliable

not by seeing people’s examples but learning the actual thing

its not in use anymore.
TWO services were made for the same purpose
mouse should only be used for managing mouse behavior, though UserInputService also does this

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.