4th Dimension Effect

A bare-bones effect I created by overlaying two viewport frames where one of them shows whats behind you. Posting here if anyone gets cool game ideas for it.

Dont mind the music, I was listening to Flyday Chinatown while testing this.

LocalScript

local LocalPlayer = game.Players.LocalPlayer

local _MatrixSize = Vector3.new(150,150,150)

local SplitScreenGui = Instance.new("ScreenGui",LocalPlayer.PlayerGui)
SplitScreenGui.IgnoreGuiInset = true
SplitScreenGui.ResetOnSpawn = false

local BackFrame = Instance.new("Frame",SplitScreenGui)
BackFrame.Size = UDim2.new(1,0,1,0)
BackFrame.BackgroundTransparency = 1

local FrontFrame = Instance.new("Frame",SplitScreenGui)
FrontFrame.Size = UDim2.new(1,0,1,0)
FrontFrame.Position = UDim2.new(0,0,0,0)
FrontFrame.BackgroundTransparency = 1

local BackViewport = Instance.new("ViewportFrame",BackFrame)
BackViewport.Size = UDim2.new(1,0,1,0)

local BackWorld = Instance.new("WorldModel",BackViewport)
local BackCamera = Instance.new("Camera",BackViewport)
BackViewport.CurrentCamera = BackCamera
BackViewport.BackgroundTransparency = 1

local FrontViewport = Instance.new("ViewportFrame",FrontFrame)
FrontViewport.Size = UDim2.new(1,0,1,0)

local FrontWorld = Instance.new("WorldModel",FrontViewport)
local FrontCamera = Instance.new("Camera",FrontViewport)
FrontViewport.CurrentCamera = FrontCamera
FrontViewport.BackgroundTransparency = 1

local Screens = {FrontWorld,BackWorld}

game:GetService("RunService").Heartbeat:Connect(function()
	wait()
	local Success, Response = pcall(function()
		FrontWorld:ClearAllChildren()
		BackWorld:ClearAllChildren()

		local CurrentCFrame = LocalPlayer.Character:GetPrimaryPartCFrame()
		local Params = OverlapParams.new()
		Params.FilterDescendantsInstances = {LocalPlayer.Character}

		local MatrixToClone = workspace:GetPartBoundsInBox(CurrentCFrame,_MatrixSize,Params)
		for index, Part in pairs(MatrixToClone) do
			for x = 1,2 do
				local Clone = Part:Clone()
				Clone.Parent = Screens[x]
				Clone.Anchored = true
				Clone.CanCollide = false
			end
		end

		FrontCamera.CFrame = workspace.CurrentCamera.CFrame
		BackCamera.CFrame = CFrame.new(CurrentCFrame.Position, CurrentCFrame.Position - CurrentCFrame.LookVector)
	end)
	
	if not Success then
		warn(Response)
	end
end)```
12 Likes

Looks super cool and you just opened my ears to an awesome genre of music :blush:

1 Like

Man, that is an interesting concept for a fun maze game…

Dang I’m already amazed at your talent.