Hi, I made this script and it doesnt work whats up with it? I ve been searching for kill scripts for so long now and I only find ontouch scripts
while 0<1 do wait(5) local humanoid = game.Parent:FindFirstChild("Humanoid") humanoid.Health = 0 end
its probably the 'game.' but i dont know what to put there instead i tried script. but nothing
Thanks again for your time!
Alright, I can see that you dont want a kill brick script. You want to kill a player without him touching a brick or smth.
Like the other guy said, you didnt provide enough information in the script to know which player to kill.
the correct thing would be like this in a normal script in serverscriptservice:
TargetPlayer = --The Players name you want to kill. while true do wait(5) -- every 5 seconds the player will die game.workspace.TargetPlayer.Humanoid.Health = 0 end
That will just loopkill a player. You didn't provide enough information for anyone to help you.
Multiple other things too. game.Parent is not accessible. Game is a roblox default varriable and cannot be overwritten.
If you want a part to kill a player:
game.Workspace.Part.Touched:Connect(function(part) if part.Parent:FindFirstChild("Humanoid") then part.Parent.Humanoid.Health = 0 end end)