Ive been working on working on a team change on death for my game, and i have it working with a button click, but can't figure out how to make it work on death
here is what I have
local plr = script.Parent.Parent.Parent.Parent.Parent.Name
script.Parent.MouseButton1Click:connect(function() game.Players[plr].TeamColor = BrickColor.new("Bright blue") game.Workspace[plr].Humanoid.Health="0" script.Parent.Parent.Parent.Enabled=false end)

1 comment
Try reading this to post better questions: https://scriptinghelpers.org/help/how-post-good-questions-answers I don't have little to no info and I can't help, sorry!