so I wanted to make a gui that can kill people by adding their username and clicking on "Kill Em!" Which removes their head which then causes them to die but for some reason, it won't work I dont know what to do and how to fix this, can someone help me please!
local plr = game.Players. local txt = script.Parent.Parent.Player.Text function onClick() Player = plr + txt + ".Character" Player.Head:Destroy() end script.Parent.Parent.Submit.MouseButton1Click:Connect(onClick)
Are you trying to run it from a localscript? if so, then you have to run it with a remote event, otherwise the person wont be dead on their screen, but for yours yes.
Use Remote events as the change will only happen on the players screen and not the server thus not killing him