Hi! i’m working on a game that uses a minimap, and i decided to reuse a minimap i had in a wayy older project of mine (that i’m pretty sure i got from a youtube tutorial), the problem: the minimap system rotation isn’t editable, and in this specific scenario, the orientation of the map right now is very annoying, and i wanted to change it, but i haven’t worked with cframes enough to be able to know how to make it so i can just adjust the rotation of the map inside the script… and since i’m very incompetent, i came here to ask for help, as one does… so yeah! code sample below:
local viewPort = script.Parent
local charPart = viewPort:WaitForChild("Character")
local buildings = workspace:WaitForChild("World")
buildings:Clone().Parent = viewPort
local camera = Instance.new("Camera", workspace)
camera.CameraType = "Scriptable"
local height = 1000 --Lower the value to make the camera come closer.
local player = game.Players.LocalPlayer
viewPort.CurrentCamera = camera
game:GetService("RunService").RenderStepped:Connect(function ()
local position = workspace.MAPFOCUS.Position
local cf1 = CFrame.new(Vector3.new(position.X,height,position.Z), position)
camera.CFrame = cf1
charPart.CFrame = player.Character.HumanoidRootPart.CFrame
end)