Trouble making Player Attached Weld disappear after Value Changed

imageimage image
So basically I have this script inside StarterCharacterScripts that, when the player value is a Soul, then there will be chains welded on the player’s character.

But the issue is that when the value changes to “Hollow1”, the chains are still there when I want it gone since the player is no longer a “Soul”.
image
It’s been days and the closest I got was this script that disables the other script from existing but shortly after the character respawns the script comes back. Please help me
https://gyazo.com/83218017259cf0091a577b6c4c7b9bb1

local Character = script.Parent.Parent -- The Local Player
local Player = game.Players:GetPlayerFromCharacter(Character)
local Race = Player.PlayerValues.Race


if Race.Value == "Hollow1" then --If Player is Hollow1
	
	Character.SoulAppearance.ChainsFate.Enabled = false --Disables the script that welds the chains
end

Not only is Enabled not a property of a script and thus your code would throw an error (it’s Disabled), but you should never actually be using the Disabled property in production code unless you have a significant reason for doing so. This comes down to reworking your code.

With what you’ve currently supplied, the race will only be checked when the first code executes. You need to actually check for changes to the race value by connecting to the ValueObject’s changed event, then determine what needs to happen from there depending on what the value is.

It’s hard to actually supply you a fix here since your implementation is confusing, but at the very least here’s some sample code you could salvage regarding this.

Race.Changed:Connect(function (newRace)
    if newRace == "Soul" then
        -- Attach chain
    else
        -- Find chain in character; if it exists, remove it
    end
end)
1 Like