#Help why is this an error and why is the color gone

1 messages · Page 1 of 1 (latest)

merry dove
#

im making a state manager is this is how the video had it how did he not get any errors

cobalt sparrow
#

Bro does not know if else

sly harness
#

cant understand what kind issue?

#

and what is state manager explan it

merry dove
#

bc i put else

#

i lined it up

violet surge
#

show full script

merry dove
#

ight

merry dove
violet surge
#

well thats happening because of the nesting

#

beig horrible

#

being

#

add extra end and see what happens

#

all the way at the end

#

of this

violet surge
#

wait

#

nvm

#

show the script in order

#

show script in pastebin

#

its easier for me

merry dove
#

ok

merry dove
#

@violet surge

violet surge
#

what are the last 15 lines

#

cant see them

#

@merry dove

merry dove
#

end
else
States[plr]["Stunned"] = nil
if plr.Character and plr.Character:FindFirstChild('Humanoid') then
local currentHumanoid = plr.Character:FindFirstChild('Humanoid')
currentHumanoid.WalkSpeed = States[plr].OriginalWalkSpeed or 16

        States[plr].OriginalWalkSpeed = nil
        StunTimer[plr] = nil
    end
    
        if next(States[plr]) == nil then
            States[plr] = nil
        end
#

thisi s the error

#

@violet surge

violet surge
#

bro format the code correctly also add an extra end

#

at the end

violet surge
#

@merry dove

merry dove
merry dove
#

erro

#

r

violet surge
#

add another end

#

and see

#

should be like this

#

or something around that

merry dove
#

oh

#

can someone tell me

#

why does it have to be formattedl ike that

#

watched countless tutorials

#

and forum

#

and they didn't tell me

#

the way something has to be formatted

violet surge
#

if you have an error like

#

something didnt close because it got then instead of ) then check your code

#

and format it

#

correctl

merry dove
#

oh ok

violet surge
#

correctly

merry dove
#

i have one more thing

violet surge
#

what i mean by format is to

#

what is that thing

merry dove
merry dove
#

ykw u don't have to help me with that

violet surge
#

ok

#

but anyways

violet surge
# merry dove

that just means plr stateKey value and duration are nonexistent or they equal to nil

merry dove
#

they are already in the module

#

script

violet surge
#

show fulls cript

south wingBOT
#

studio** You are now Level 9! **studio

violet surge
#

script

merry dove
merry dove
#

oh

violet surge
#

you cant reference it from the modulescript

#

you have to reference it from the script that requires the modulescript in order to use it in the modulescript

merry dove
#

local stateKey = "idle"

violet surge
#

yeah

#

like

#

local blah1=“idk”

Module.Blah2(blah1)

—modulescript

function module.Blah2(blah1)
if blah1==“idk” then
print(blah1)
end
end

#

since blah1 is “idk” then it would print “idk” in the output