I’m scripting a minimap and my current code is this:
local run = game:GetService("RunService")
local Players = game:GetService("Players")
local mapCoverage = {
Size = Vector3.new(9552, 0, 8928)
}
local scale = 1/1200
local minimap = script.Parent
local plr = Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hrp = char:WaitForChild("HumanoidRootPart")
run.RenderStepped:Connect(function()
local hrpX = hrp.Position.X * scale
local hrpZ = hrp.Position.Z * scale
minimap.Position = UDim2.new(hrpX, 0, hrpZ, 0)
end)
However this isn’t accurate, do you have any helpful tips to make it more accurate? It currently shows me in wrong places.