I want to make a crouching script using thumbstick position
--Custom--
local minimum = 1
local maximum = 5
----------
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.Thumbstick1 then
Input:GetPropertyChangedSignal("Position"):Connect(function()
print(Input.Position.Y)
end)
end
end)
but it doesnt print anything? does anyone know why this could be?
--Custom--
local minimum = 1
local maximum = 5
----------
local UserInputService = game:GetService("UserInputService")
UserInputService.InputChanged:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.Thumbstick1 then
Input:GetPropertyChangedSignal("Position"):Connect(function()
print(Input.Position.Y)
end)
end
end)
for some reason it doesnt work with UserInputService.InputBegan and it has to be UserInputService.InputChanged