local RunService = game:GetService("RunService") local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local rootPart = character:WaitForChild("HumanoidRootPart") local viewport = script.Parent.ViewportFrame local arrow = viewport.ImageLabel local camera = Instance.new("Camera") camera.Parent = workspace camera.CameraType = Enum.CameraType.Scriptable viewport.CurrentCamera = camera camera.FieldOfView = 1 for i, part in pairs(game.Workspace.MiniMap:GetDescendants()) do if part:IsA("BasePart") then local object = part:Clone() object.Parent = viewport end end RunService.RenderStepped:Connect(function() camera.CFrame = CFrame.new( rootPart.Position + Vector3.new(0, 3000, 0), rootPart.Position )
It's only rendering the part that's actually shown on the mini map. And the camera is very far away which lowers the quality and increases performance. It shouldn't cause any lag :)
script : local RunService = game:GetService("RunService") local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local rootPart = character:WaitForChild("HumanoidRootPart") local viewport = script.Parent.ViewportFrame local arrow = viewport.ImageLabel local camera = Instance.new("Camera") camera.Parent = workspace camera.CameraType = Enum.CameraType.Scriptable viewport.CurrentCamera = camera camera.FieldOfView = 1 for i, part in pairs(game.Workspace.MiniMap:GetDescendants()) do if part:IsA("BasePart") then local object = part:Clone() object.Parent = viewport end end RunService.RenderStepped:Connect(function() camera.CFrame = CFrame.new( rootPart.Position + Vector3.new(0, 3000, 0), rootPart.Position )
Why dosent this load my whole game. The minmap works and all and its a great tutorial but it cant ssem to render in my whole game. Only the place i spawn a small part of it?
I don't understand how really cool and (useful) things are so so so underrated. Good job man!
I didn't know that it was this simple! Thanks
local RunService = game:GetService("RunService")
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local rootPart = character:WaitForChild("HumanoidRootPart")
local viewport = script.Parent.ViewportFrame
local arrow = viewport.ImageLabel
local camera = Instance.new("Camera")
camera.Parent = workspace
camera.CameraType = Enum.CameraType.Scriptable
viewport.CurrentCamera = camera
camera.FieldOfView = 1
for i, part in pairs(game.Workspace.MiniMap:GetDescendants()) do
if part:IsA("BasePart") then
local object = part:Clone()
object.Parent = viewport
end
end
RunService.RenderStepped:Connect(function()
camera.CFrame = CFrame.new(
rootPart.Position + Vector3.new(0, 3000, 0),
rootPart.Position
)
arrow.Rotation = - rootPart.Orientation.Y - 90
end)
You deserve WAY more subscribers 😮 W tutorial
OMG this has helped me so much your a life saver ❤
tysm for this!!
another w tut vid keep it up man!
Thank you! thhis has helped me so much, i'm making a horror game rn, very useful
★★★★★
I have a question: Can that lag the game a lot? Because it uses a viewport frame for which I basically have to duplicate the entire map a second time.
just use screenshots it's better
It's only rendering the part that's actually shown on the mini map. And the camera is very far away which lowers the quality and increases performance. It shouldn't cause any lag :)
@@LennertDevelops Oh alright, thanks a lot :D
do you know how i can make so i see more of the map but dont make the viewportframe bigger
similar content creator here. Nice job.
Thanks!
Nice
Question: What if I want other players to show up on the map? 🤔🤔
can u make a tutorial on how to make teamdeath match please
script : local RunService = game:GetService("RunService")
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local rootPart = character:WaitForChild("HumanoidRootPart")
local viewport = script.Parent.ViewportFrame
local arrow = viewport.ImageLabel
local camera = Instance.new("Camera")
camera.Parent = workspace
camera.CameraType = Enum.CameraType.Scriptable
viewport.CurrentCamera = camera
camera.FieldOfView = 1
for i, part in pairs(game.Workspace.MiniMap:GetDescendants()) do
if part:IsA("BasePart") then
local object = part:Clone()
object.Parent = viewport
end
end
RunService.RenderStepped:Connect(function()
camera.CFrame = CFrame.new(
rootPart.Position + Vector3.new(0, 3000, 0),
rootPart.Position
)
arrow.Rotation = - rootPart.Orientation.Y - 90
end)
Why dosent this load my whole game. The minmap works and all and its a great tutorial but it cant ssem to render in my whole game. Only the place i spawn a small part of it?
becaause ur not putting ur whole map in the minimap folder
if you mean you want it to zoom out fully i think js change the y position of the camera to be bigger so it shows more of the map
@@asgasgagsagbgdfs what if I moved all the objects, but it’s still not visible
hello, i am from the netherlands and i was wondering if we can make a game together?
how old are you mate you sound so young
also you are skilled !
he's probably 13-14
Ben jij van belgië.
stroopwafel