Hello!
Recently, I’ve been trying to make a first person fighting game, and to make the arms to show up while in first person I decided to use LocalTransparencyModifier.
It works great when idle, but when the character starts to spin around, it becomes pretty choppy:
This is the script I am currently using to achieve this:
local function modifyTransparency()
for _, part in pairs(character:GetChildren()) do
-- head gets in the way
if part:IsA("BasePart") and part.Name ~= "Head" then
part.LocalTransparencyModifier = 0
end
end
end
-- some stuff to make the camera look good
humanoid.CameraOffset = Vector3.new(0, 0, -1)
currentCamera.FieldOfView = 85
armsIdleAnimation:Play()
RunService.RenderStepped:Connect(function()
-- not sure if calling this every frame is the most efficient,
-- but when doing research for how to do this I kept seeing this
modifyTransparency()
end)
Does anyone know any potential fixes there are or workarounds for this? Thanks!