More camera, might deprecate the custom camera

This commit is contained in:
2023-12-21 03:37:25 -05:00
parent b879e5ac85
commit 6c7a4ced45
10 changed files with 225 additions and 23 deletions

View File

@@ -0,0 +1,35 @@
--Heh, i copied and pasted this from Character/Server/Shadows.lua
local LTM = {}
LTM.__index = LTM
type Character = Model
function LTM.constructor(Character: Character)
return setmetatable({
Character = Character
}, LTM)
end
function LTM:PartToggle(Instance: BasePart, Visible: boolean)
if Instance:IsA("BasePart") then
Instance.LocalTransparencyModifier = Visible and 0 or 1
end
end
local function CharacterLTM(self, enabled: boolean)
local CharacterDescendants = self.Character:GetDescendants()
for i = 1, #CharacterDescendants do
self:PartToggle(CharacterDescendants[i], enabled)
end
end
function LTM:on()
CharacterLTM(self, true)
end
function LTM:off()
CharacterLTM(self, false)
end
return LTM