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

Fire is not enabling in a script?

Asked by 10 years ago

Hello, I was just wondering on why this fire enable script is not working.

Please may you take a look?

    local children = workspace.Mainframe_Status_Fire_Parts:GetChildren()
        for i = 1, #children do
        i, children[i].Fire.Enabled = true

This is how my module is set out:

Workspace
    Mainframe_Status_Fire_Parts
        One
            Fire
        Two
            Fire
        Three
            Fire
        Four
            Fire
        Five
            Fire
        Six
            Fire
        Seven
            Fire
        Eight
            Fire
        Nine
            Fire
0
You really need to consider learning how to code in Lua. Tkdriverx 514 — 10y
0
Thank you for your help.. WelpNathan 307 — 10y
0
There are so many syntax errors in your code, I don't know where to begin where I would be able to HELP you. Tkdriverx 514 — 10y
0
Help then please> WelpNathan 307 — 10y

1 answer

Log in to vote
2
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
10 years ago

You're close. You just forgot an end, and you don't need the extra i on line 3.

local children = workspace.Mainframe_Status_Fire_Parts:GetChildren()
for i = 1, #children do
    children[i].Fire.Enabled = true
end
0
Thank you! Haha silly mistake of mine :p WelpNathan 307 — 10y
Ad

Answer this question