Stand.OnServerEvent:Connect(function(player,active)
if active == true then
local Character = player.Character
local HumanoidRP = Character:WaitForChild("HumanoidRootPart")
local myStand = workspace:WaitForChild(player.Name.." Stand")
myStand:Destroy()
Stand:FireClient(player)
end
end)
If active is true, it does the following. The thing is, i need the if statement to also activate if the player died. I know you can add an "or" after the active == true, so it will be
if active == true or ... then
but I dont know how to make it recognized if your alive.
Btw, this is in a Script not a local script.

9 comments
theres an error in the output that says " 21:02:51.476 - Humanoid is not a valid member of Player".
Oh! Change player to character. My bad
I have edited the script
Ok, now it works, but it only deletes the stuff inside the script. How do i get it to delete the folder itself aswell?
If myStand is in the Folder, then do myStand.Parent. Make sure to mark the answer as correct if it helped you!
ok, one more question, how do i define player? can i do local player = ... or something?
Like outside of Stand.OnServerEvent:Connect(function(player,active)
uh thats a question for a different day! Hope this helped! Make sure to mark my post as the answer if it was right!
Understandable, thanks!