I’m making an options GUI for a game me and a team of people are working on. The GUI should be able to disable certain character sounds such as Jumping, which works until you reset. I’m trying to make the options stay on or off when you reset.
When disabling any of the character sounds (Jumping, death noise, walking, etc) and resetting the script suddenly doesn’t work anymore. It prints an error saying “Jumping is not a valid member of Part AutumnsBlanket.HumanoidRootPart”
I’ve already tried turning off ResetOnSpawn on the GUI. I’ve also implented a script that handles deaths which works for options that don’t involve the character, but doesn’t work for ones that do involve the character

Have you tried to update the character when the character dies?
1 Like
Try HumanoidRootPart:WaitForChild("Jumping")
. it’s erroring because client sometimes delays to load stuff into the datamodel. So WaitForChild() should compensate for that.
That seemed to stop the error, but now prevents the jumping sound from moving back into the HumanoidRootPart
Yeah, still doesn’t seem to work
When you update the character you need to also update the died connection by creating a new one.
Creating a new one as in creating a whole new script for it? Or just adding another Died function
How about you try this
PlayerStorage:WaitForChild('Jumping'):Clone().Parent = Character:WaitForChild('HumanoidRootPart')
When an object is destroyed the connections get :Disconnect() so you will need to :Connect() again to ensure it keeps working.
Wouldnt it be easier to use the humanoid to detect if the player is jumping?
https://developer.roblox.com/en-us/api-reference/class/Humanoid#jump
1 Like
Will do, I haven’t tried cloning yet.
1 Like
That makes sense, I’ll try going about reconnecting it
This might have something to do with it
Yeah I realized that and fixed it
try this script instead
local player = game:GetService("Players").LocalPlayer
local Character = player.Character
local Parent = script.Parent
local ON = true
local Volume = 1
script.Parent.MouseButton1Click:Connect(function()
if ON == true then
ON = false
Volume = 0
script.Parent.BackgroundColor3 = Color3.fromRGB (255, 0, 0)
script.Parent.Text = "OFF"
Character.HumanoidRootPart:WaitForChild("Jumping").Volume = Volume
else
ON = true
Volume = 1
script.Parent.BackgroundColor3 = Color3.fromRGB(38, 255, 0)
script.Parent.Text = "ON"
Character.HumanoidRootPart:WaitForChild("Jumping").Volume = Volume
end
end)
game.Players.LocalPlayer.CharacterAdded:Connect(function(char)
Character = char
Character:WaitForChild("HumanoidRootPart"):WaitForChild("Jumping").Volume = Volume
end)
1 Like
This worked perfectly! Thank you
1 Like