Broken Module Script

  1. What do you want to achieve? I want to fix the humanoid died code.

  2. **What is the issue?**I am trying to edit the roblox official template: “Capture the Flag” on my wish.
    Editing means I try to change the GUI, maps and so on, but I think the “FlagStandManager” module script is broken, because there’s a

local function OnCarrierDied(player) 

which is called when a character leaves or dies:

local function OnPlayerAdded(player)
	player.CharacterAdded:connect(function(character)
		character:WaitForChild('Humanoid').Died:connect(function() OnCarrierDied(player) end)
	end)
	player.CharacterRemoving:connect(function()
		OnCarrierDied(player)
	end)
end

I placed a few

print()

but it doesn’t print them, so the function isn’t called at all. The main problem is that this function anchors the flag so other player can pick it up. Without it working normal, the flag just goes underneath the map and gets destroyed at -400 in workspace. Please help me!

EDIT: GRAMMATICAL ERROR

It might be in old capture the flag system so it might not be fully functional and in that case I recommend making your own.

I don’t know. This is the template which shows up when open the Studio Selection Screen.

still, it is usally bad practice and would be better for you to make your own as it would teach you.

1 Like

Thanks for your advice. I am going to make a research and try to make my own.

1 Like