#ServerStorage.MiniGames.Lava Rising:51: invalid argument #1 to 'ipairs' (table expected, got nil)

1 messages · Page 1 of 1 (latest)

ember sail
#

im trying to make a minigames game with my friend but this happends when i try to win a game? help me.

#

this is the script btw

#

local MiniGame = {}
local LavaRising = script:WaitForChild("LavaRising")

local riseTime = 25
local riseDelay = 3

local TweenService = game:GetService("TweenService")
local riseTweenInfo = TweenInfo.new(
riseTime,
Enum.EasingStyle.Linear,
Enum.EasingDirection.InOut,
0,
false,
riseDelay
)

function MiniGame.RunGame()

-- Set up game
local newGame = LavaRising:Clone()
newGame.Parent = workspace

newGame.Lava.Touched:Connect(LavaTouched)

local riseTween = TweenService:Create(
    newGame.Lava,
    riseTweenInfo,
    {CFrame = newGame.RisePosition.CFrame}
    
)


-- Start Game
_G.TeleportPlayers(newGame.SpawnPoint.CFrame, true)

riseTween:Play()

-- CountDown
for countDown = riseTime, 0, -1 do
    
    _G.gameStatus.Value = "Get To the Top(".. countDown .. ")"
    task.wait(1)
end


-- End of Game
-- End of Game
local winners workspace.InGame:GetChildren()
local endText = "The winners are: "

for i, plrchar in ipairs(winners) do
    
    local plr = game.Players:GetPlayerFromCharacter(plrchar)
    plr.leaderStats.Wins.Value += 1
    
    endText = endText .. plr.Name .. " "
end

_G.gameStatus.Value = endText
task.wait(3)

newGame:Destroy()

end

function LavaTouched(hit)

local humanoid = hit.parent:FindFirstChild("Humanoid")
if humanoid then
    
    humanoid.Health = 0
end

end

return MiniGame

#

pls help me, i cant finish anything if this bug is happening

#

i promised to my friend that i got this

#

😭

#

im watching a tutorial

#

but this happends

#

Like for part 4!
Tell me YOUR video ideas in the comments so I can make vids that you guys want.

Wins Gui model: create.roblox.com/store/asset/17418846923/Wins-Gui

This is part 3 in the how to make Mini Games game series, so go watch part 1 and 2 if you have not already

Part 1: https://youtu.be/MTp5PmKcUxo
Part 2: https://youtu.be/5av6JtrrZzM...

▶ Play video
feral socket
#

wtf is this

#

what kind of tutorial would tell you to use _G

#

who the fuck puts functions into _G

#

dont do this

ember sail
#

bro i dont know

#

it came out a year ago

#

augh

#

😭

#

no newer tutorials

#

@feral socket what do i put then

#

..

feral socket
#

but if you do want to fix it

#

local winners workspace.InGame:GetChildren()

ember sail
#

yessir

feral socket
#

this doesnt make sense

#

it needs a =

ember sail
#

the tutorial said that

#

Oof

#

so uh

#

can you help me somehow

#

?

ember sail
#

are you gonna fix it

#

😭

feral socket
#

?

#

i told you the issue

ember sail
#

-# oh

#

-# uh can you edit the script and send it pls? 😭

feral socket
#

you shouldnt be blindly following tutorials like that if you have absolutely no idea how to script

ember sail
#

thats why its called a tutorial

#

!!

feral socket
#

yes but you dont learn anything from copypasting code that you dont understand

ember sail
#

㊗️