First person transparency not working as it should

I want to create a script that when an event is called it would put the player in an animation (note that the game is first person!) and make their arms non-transparent until another event is called. By default roblox keeps body parts transparent which is fine but for that animation, they are needed to be seen. This is the script:

local Players = game:GetService("Players")
local breakline = false

local player = Players.LocalPlayer
local character = player.Character
if not character or not character.Parent then
	character = player.CharacterAdded:Wait()
end
local function e()
	local human = character:FindFirstChild("Humanoid")
	if human ~= nil then
		local anim = human:LoadAnimation(script:WaitForChild("Animation"))
		anim.Priority = Enum.AnimationPriority.Action
		anim:Play()
	end
	while true do
		character:FindFirstChild("Left Arm").LocalTransparencyModifier = 0
		character:FindFirstChild("Right Arm").LocalTransparencyModifier = 0
		
		if breakline then
			break
		end
		
		game["Run Service"].Heartbeat:Wait()
	end
	breakline = false
end

script.Event.Event:Connect(e)
script.stop.Event:Connect(function() breakline = true end)

Everything works except when the player is fully zoomed in everything disappears, including arms. I have tested that when the player is semi-transparent (that is when the player is almost in first person) the arms stay fully seen, though the problem in the previous sentence persists.

Is this on the roblox’s end and I have to find a way around that or have I made a mistake? Please let me know.

1 Like