I am trying to rotate a model in this ViewportFrame with the thumbstick of a gamepad. However although it works, the model is spinning way too fast and I am unsure how to slow it down.
local DEADZONE = 0.4
UserInputService.InputChanged:Connect(function(InputObject, GameProcessed)
if (InputObject.UserInputType == Enum.UserInputType.Gamepad1) and (InputObject.KeyCode == Enum.KeyCode.Thumbstick2) then
if (InputObject.Position.X >= DEADZONE) then
InventoryRig.PrimaryPart.CFrame *= CFrame.fromEulerAnglesXYZ(0, InputObject.Position.X, 0)
elseif (InputObject.Position.X <= -DEADZONE) then
InventoryRig.PrimaryPart.CFrame *= CFrame.fromEulerAnglesXYZ(0, InputObject.Position.X, 0)
end
end
end)