local UserInputService,RunService = game:GetService("UserInputService"),game:GetService("RunService")
RunService.RenderStepped:connect(function(Delta)
local FPS = 1/Delta
local GyroscopeEnabled = UserInputService.GyroscopeEnabled
local AccelerometerEnabled = UserInputService.AccelerometerEnabled
local _,Gyro = UserInputService:GetDeviceRotation()
local Acceleration = UserInputService:GetDeviceAcceleration().Delta
script.Parent.Text = "FPS: "..FPS.."\nGyroscope (Enabled: "..tostring(GyroscopeEnabled).."): "..tostring(Gyro).."\nAccelerometer (Enabled: "..tostring(AccelerometerEnabled).."): "..tostring(Acceleration)
end)
They are only returning blank values. This was confirmed on 2 devices (my Samsung Galaxy S7, and my NVIDIA SHIELD K1 tablet), both running Android 6.0.1.
Currently the functions won’t work until you connect to the events. This was sort of done on purpose so we don’t continuously poll the motion sensors if you aren’t using them. I’ll try and update the functions to turn on the sensor polling. Thanks for the report!