im trying to make a script where it shows the heading of the object in degrees from 0-360 instead of moving from 180 to negative 180 and then back down.
script
screenGui.Azimuth.Text = string.format("%0.4i", handle.Orientation.y)
and heres the entire script in case you need that
local handle = script.Parent.Handle
local screenGui = script:WaitForChild("Coordinates"):Clone()
local liam = false
tool.Equipped:Connect(function()
screenGui.Parent = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")
liam = true
while liam == true do
wait(0.05)
if game.Players.LocalPlayer.Character.Humanoid.MoveDirection ~= Vector3.new() then
screenGui.CoordinateX.Text = string.format("%0.5i", handle.Position.x)
screenGui.CoordinateY.Text = string.format("%0.5i", handle.Position.y)
screenGui.CoordinateZ.Text = string.format("%0.5i", handle.Position.z)
screenGui.Azimuth.Text = string.format("%0.3i", handle.Orientation.y)
end
end
end)
tool.Unequipped:Connect(function()
screenGui.Parent = nil
liam = false
screenGui.Parent = script
end) ```