Fps arms disappearing at certain angles

so I was trying to add fps arms to my game when I noticed that the arms were randomly disappearing and re-appearing at certain camera angles.

I ruled out the fps system as the issue, since the arms had no problem in 3rd person

This is the only script in the game that changes the local transparency, so im a bit confused on why im having this issue.

local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local LocalPlayer = game:GetService("Players").LocalPlayer
local character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
local Gun = script.Parent:WaitForChild("Rifle")

local function updateCharacterTransparency()
	local PlayerUniform = character:WaitForChild("Uniform")
	
	PlayerUniform:WaitForChild("Left_Sleeve").LocalTransparencyModifier = 0
	PlayerUniform:WaitForChild("Right_Sleeve").LocalTransparencyModifier = 0
	character:WaitForChild("Left Arm").LocalTransparencyModifier = 0
	character:WaitForChild("Right Arm").LocalTransparencyModifier = 0
end

RunService.RenderStepped:Connect(updateCharacterTransparency)

Any help is appreciated!

Perhaps instead of changing the transparency upon render step you can do Limb:GetPropertyChangedSignal(“LocalTransparencyModifier”) to instantly change back the local transparency. Other option is to fork the camera module and disable the line making the arms transparent.

Maybe you shouldn’t rule out the fps system too early.

The transparency code seems ok and seems unrelated to a change in angle.

It could also be a CFrame issue with parts going NaN and go missing which I have experienced before. So my first idea is to check for that through prints and such.

1 Like

The PropertyChangedSignal didnt solve the issue so I changed the transparency model which kinda worked.

New problem is that now the arms still glitch unless I disable the entire line for the transparency, and im not sure what to do now.

if self.transparencyDirty or self.lastTransparency ~= transparency then
	for child, _ in pairs(self.cachedParts) do
		if child.Name == "Left Arm" or child.Name == "Right Arm" or child.Name == "Left_Sleeve" or child.Name == "Right_Sleeve" then
			child.LocalTransparencyModifier = 0
		else
			child.LocalTransparencyModifier = transparency  --(still glitches unless this part is disabled)
		end
	end
	self.transparencyDirty = false
	self.lastTransparency = transparency
end

The script is fine apparently, its was something to do with the uniform mesh.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.