I made a script where it displays the character’s body via first person. I am aware that it would only appear on one frame, and to avoid using a while
loop with task.wait
I instead used RunService.RenderStepped
.
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local localPlayer = Players.LocalPlayer
local character = localPlayer.CharacterAdded:Wait()
RunService.RenderStepped:Connect(function(deltaTime)
for _, child in pairs(character:GetChildren()) do
if child:IsA("BasePart") and child.Name == "Left Arm" or child.Name == "Right Arm" then
child.LocalTransparencyModifier = child.Transparency
child.CastShadow = false
end
end
end)
The Issue
For some reason, whenever my character respawns/resets, when I go first person mode, I no longer see my arms - why would this happen? I know the runService still worked because I put a print statement there.
P.S: The script is located in StarterPlayerScripts
I tried perhaps putting it into StarterChracacterScripts but for some reason, not a single script I put there every works, can anyone tell me why, or what is it used for, cus, with my understanding, it is a script that reruns every time a new character spawns.