So, i want to make that if the Player dies, it should appear a part on the Player torso (to simulate a non-realistic blood), but for some reason i get this on the output: 18:43:59.316 - Workspace.Script:6: bad argument #2 to '?' (string expected, got Object) 18:43:59.317 - Stack Begin 18:43:59.317 - Script 'Workspace.Script', Line 6 18:43:59.317 - Stack End
Script:
game:GetService("Players").PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
character:WaitForChild("Humanoid").Died:Connect(function()
local a = Instance.new("Part")
a.BrickColor = BrickColor.new("Really red")
a.Parent = game.Workspace[character]
end)
end)
end)
It would be cool if someone can fix the script since i don't have any idea of how to fix this.

4 comments
Thank you! it worked
Should "a.Parent = character" be "a.Parent = character.Torso" ?
I tried the two things and it looks like the same.
a's Parent being the Part can be basically anything you want. Anywhere in the Worksapce will work.