Hello! I’m attempting to recreate the “Scanner” from DOORS. They display everything onto a little screen on the item and turn it night vision. They also show a star on important items. Is there a way I can recreate this? Thanks! (I do know I may have to use a viewport texture)
You are correct about needing a viewport texture. It depends on how you want to optimize it but basically you will be copying the world over into the viewport frame, setting the current camera to be your camera, and putting the viewport on a surface gui on a tool. You can either color all the parts you put in it and create new instances for special markers or you can use a semi transparent overlay with individual image labels to touch up things fully through gui elements.
so I am required to copy all of the workspace into the item? If so, I have randomly generating rooms. They generate when you open a door…
Not necessarily all of them, just the room that the player will be in. The viewport should be updated every time the room changes
so what I did is when ever the user opens a door, it clones the room, next room, and next door so nothing is non-filled in.
local nextRoom = allDoors:FindFirstChild(nextDoorNumber)
local nextDoor = nextRoom:FindFirstChild("DefaultDoor")
task.spawn(function()
local gui = player.PlayerGui.Gui.ViewportFrame
for i,v in gui:GetChildren() do
if not v:IsA("Script") then
v:Destroy()
end
end
wait()
local rom = allDoors:FindFirstChild(nextDoorNumber-1):Clone()
local door = nextDoor:Clone()
local room = nextRoom:Clone()
room.Parent = gui
door.Parent = gui
rom.Parent = gui
end)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.