local player = game.Players.LocalPlayer player.CharacterAdded:Wait() local character = player.Character script.Parent.MouseButton1Click:Connect(function() local humanoid = character:FindFirstChildOfClass("Humanoid") if humanoid then humanoid.Health = 0 end end)
when i click it, it does not kill me
script.parent.MouseButton1Click:connect(function() game.Players.LocalPlayer:Kick("Removed from server!") end)
and when i click this one it does not kick me
help?
You don't need lines 1-3 aswell as 5 in the first script, this is delaying the script. It should look like this:
function clicked(playerWhoClicked) playerWhoClicked.Character.Humanoid.Health = 0 end script.Parent.MouseClick:connect(clicked)
Make sure that this script is not a LocalScript. ^ I'm not sure if I could help with the second script, sorry. Have fun scripting!