Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is There a red line there?

Asked by
IcyEvil 260 Moderation Voter
10 years ago

Its either I need a 'for' Loop(Forgotten How to make one unless its via for _,v in pairs(game.Player:GetChildren()) do )

But there is a red line right at '#' And No Idea why.

while wait() do
    health = {10, 15, 25, 40, 45, 60, 34, 26, 67, 78, 93, 100}
    end
    for _,v in pairs(game.Players:GetChildren())do
local function kill()
    local humanoid = v.Character:findFirstChild("Humanoid")
    if humanoid then
        humanoid.Health = {1, 12 #health)-- Red line under '#'

end
end
end
end
0
It means there's a syntax error. Tkdriverx 514 — 10y
0
You used a '{' instead of a '(' under line 8. :P TheeDeathCaster 2368 — 10y

1 answer

Log in to vote
1
Answered by 10 years ago
while wait() do
    health = {10, 15, 25, 40, 45, 60, 34, 26, 67, 78, 93, 100}
    end
    for _,v in pairs(game.Players:GetChildren())do
local function kill()
    local humanoid = v.Character:findFirstChild("Humanoid")
    if humanoid then
        humanoid.Health = (1, 12 #health)-- Problem as stated by Alpha was you used { instead of a (

end
end
end
end
Ad

Answer this question