Minimap Position Marker for Square Maps thumbnail
0 views0 copies0 likes

Minimap Position Marker for Square Maps

Universal script

Copy it, then test it in your own Studio place.

UI systems Verified

Script code

22 lines · 1.0 KB
Download
local RunService = game:GetService("RunService")local player = game:GetService("Players").LocalPlayerlocal bounds = workspace:WaitForChild("MapBounds")local gui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))gui.ResetOnSpawn = falselocal map = Instance.new("Frame", gui)map.AnchorPoint = Vector2.new(1, 0)map.Position = UDim2.new(1, -24, 0, 64)map.Size = UDim2.fromOffset(132, 132)map.BackgroundColor3 = Color3.fromRGB(17, 39, 67)local dot = Instance.new("Frame", map)dot.AnchorPoint = Vector2.new(0.5, 0.5)dot.Size = UDim2.fromOffset(9, 9)dot.BackgroundColor3 = Color3.fromRGB(66, 255, 208)-- …open Get script for the full source

About this script

Add an anchored part called MapBounds centered on your playable area, with X and Z size covering the map. This LocalScript draws a small square radar and moves its dot according to your avatar's position inside those bounds. It supports a rotated bounds part and clamps the dot at the border. Add a map image under the dot once your world layout is stable.

Comments

Share what works, ask questions, or report an issue.

0

Log in to leave a comment.

No comments yet

Be the first to share your thoughts!

Raw Luau source

local RunService = game:GetService("RunService")
local player = game:GetService("Players").LocalPlayer
local bounds = workspace:WaitForChild("MapBounds")
local gui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
gui.ResetOnSpawn = false
local map = Instance.new("Frame", gui)
map.AnchorPoint = Vector2.new(1, 0)
map.Position = UDim2.new(1, -24, 0, 64)
map.Size = UDim2.fromOffset(132, 132)
map.BackgroundColor3 = Color3.fromRGB(17, 39, 67)
local dot = Instance.new("Frame", map)
dot.AnchorPoint = Vector2.new(0.5, 0.5)
dot.Size = UDim2.fromOffset(9, 9)
dot.BackgroundColor3 = Color3.fromRGB(66, 255, 208)
RunService.RenderStepped:Connect(function()
	local root = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
	dot.Visible = root ~= nil
	if not root then return end
	local p = bounds.CFrame:PointToObjectSpace(root.Position)
	dot.Position = UDim2.fromScale(math.clamp(0.5 + p.X / bounds.Size.X, 0.04, 0.96),
		math.clamp(0.5 + p.Z / bounds.Size.Z, 0.04, 0.96))
end)