i am trying to make it so when a player dies the player unequips all the tools its holding
i have tried putting this in my lightsabertool but with no effect?
if script.Parent.Parent:FindFirstChild("Humanoid").Died then
script.Parent.LightsaberEnabled.Value = false
remoteEvent2:FireServer()
script.Parent.Attack1.Enabled = false
script.Parent.Attack2.Enabled = false
script.Parent.Attack3.Enabled = false
script.Parent.Attack4.Enabled = false
script.Parent["Lightsaber top"].Part.Outer.Enabled = false
script.Parent["Lightsaber top"].Part.Inner.Enabled = false
script.Parent.Equippedvalue.Value = false
script.Parent["Lightsaber ignite"].Enabled = false
script.Parent.serverignite.Enabled = false
script.Parent.serverSwoosh.Enabled = false
script.Parent.serverdisable.Enabled = false
script.Parent["lightsaber swoosh"].Enabled = false
script.Parent["Lightsaber Disable"].Enabled = false
script.Parent["Lightsaber ignite"].Ignite:Stop()
script.Parent.lightsaberonidle:Stop()
script.Parent["Lightsaber Disable"].Disable:Stop()
script.Parent["Lightsaber top"].Part1.Transparency = 1
script.Parent["Lightsaber top"].Part1.PointLight.Enabled = false
script.Parent["Lightsaber top"].Part1.ParticleEmitter.Enabled = false
script.Parent["Lightsaber top"].Part1.Trail.Enabled = false
script.Parent["Lightsaber top"].Part.Transparency = 1
script.Parent["Lightsaber top"].Part.PointLight.Enabled = false
script.Parent["Lightsaber top"].Part.Trail.Enabled = false
script.Parent["Lightsaber top"].Part.ParticleEmitter.Enabled = false
end
i need some help on this i dont think its to hard but i cant figure it out rn