Help im trying to make this give admins more health on my game but line 2 is braking the whole script! its also a player has entered the game script but line 2 is the only thing going wrong! Please Help!
function onPlayerEntered()
local humanoid = player.Character:findFirstChild("Humanoid")
local message = Instance.new("Message")
message.Parent = game.Workspace
if player.Name ~= "theamazemanII" and player.Name ~= "BUTSTINK" and player.Name ~= "brickfusion" then
message.Text = "Welcome "..player.Name.." to Berk!"
wait(3)
message:remove()
else
message.Text = "Welcome the Chief Viking "..player.Name.." to Berk!"
humanoid.MaxHealth = 500
humanoid.Health = 500
wait(3)
message:remove()
for _, player in pairs(game.Players:GetPlayers()) do
PlayerAdded(player)
end
end
end

2 comments
didnt work =(
What did you try? You need to provide more context.