-
What do you want to achieve? I want to fix the humanoid died code.
-
**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