Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Currently working on first person arms, does anybody know how I can fix this?

I've been making a game, and have made some first person arms after watching a tutorial. When the player dies, the arms stay floating midair when they respawn, but they still have the arms on their screen. Does anybody know how I can add to the script so when they die, the arms disappear?

This is the script:

local player = game.Players.LocalPlayer

local char = script.Parent

local cam = workspace.Camera

local run = game:GetService("RunService")

local arms = game.ReplicatedFirst.Arms:Clone()

run.RenderStepped:Connect(function()

	arms:SetPrimaryPartCFrame(cam.CFrame * CFrame.new(0,-1.5,0))

end)

arms.Parent = cam

1 answer

✓ Accepted answer
char.Humanoid.Died:Connect(function()
	arms.Parent = nil
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.