I want to get device’s orientation accurately.
I tried to use this script:
local Service = game:GetService('UserInputService')
if Service.GyroscopeEnabled then
Service.DeviceGravityChanged:Connect(function(acceleration)
script.Parent.Background.Arrow.Rotation = acceleration.Position.Y
end)
else
game:GetService('Players').LocalPlayer:Kick('Your device does not support compass or you need to enable location or sensors on Roblox app permissions from device settings!')
end
It’s not getting the device’s orientation properly!
Is there a another script I can try?