I tried making a script that should kill all players on start but it does not work. Here's the code (note that i am a beginner scripter) :
local Players = game:GetService("Players")
game.Players.PlayerAdded:connect(function(player)
print(player)
local pname = player.Name
wait(4)
local homanuid = game.workspace..player.Name
local hooman = homanuid:FindFirstChild("Humanoid")
repeat until hooman.Health == 0
hooman.Health = -10
wait(0.2)
end)
What's wrong? And the error is "attempt to concatenate field 'workspace' (a userdata value)" on line 7.

6 comments
u got two periods my dude
I don't think you can concatenate it with ".." since it's an object
Omg INOOBE
Gonna up your comment :) am a big fan
I see that you typed print(player) without those: ""
KOMKO190 what no thats a variable