I need help reeeeeeeeeeeeee

So i have a huge problem with my map “Fading Memories”.
the button function i added in the scripts only works randomly, it works 3% of the time and the rest it doesn’t do anything at all.

this is my map script:

local Lib = workspace.Multiplayer.GetMapVals:Invoke() --Has: Map, Script, Button, btnFuncs
Lib.Button:connect(function(p, bNo) if Lib.btnFuncs[bNo] then Lib.btnFuncs[bNo](bNo, p) end end)
Lib.Script.moveWater(Lib.Map._Door1, Vector3.new(0, 14, 0), 3.5, true)
Lib.Script.moveWater(Lib.Map._Water1, Vector3.new(0, 50, 0), 6, true)
Lib.Script.setWaterState(Lib.Map._Water2, “acid”)
Lib.Script.moveWater(Lib.Map._Water2, Vector3.new(0, 102, 0), 14, true)
–Broken idk why
Lib.btnFuncs[5] = function()
Lib.Script.moveWater(Lib.Map._Door2, Vector3.new(0, -20, 0), 3, true)
Lib.Script.moveWater(Lib.Map._Door3, Vector3.new(0, 17, 0), 3, true)
Lib.Script.moveWater(Lib.Map._Door4, Vector3.new(0, 31, 0), 4, true)
Lib.Script.moveWater(Lib.Map._Water3, Vector3.new(0, 43, 0), 6, true)

can someone give me some help and tell me why its doing this?
Thanks :smiley:

1 Like

wait, so youre saying it works sometimes only? because i dont see anything wrong with the script really. do you mean that when entering the lift and the map starts the script and that point sometimes breaks and sometimes not? well, not really sure… maybe try recreating your script again, in the meanwhile let me check for any errors in the script

also i need the ID of the map too

alr well heres the ID: 5413163998
also i might just make the door use a _Fade5 because the script is being dumb

hope you like it to lol

All the button functions should be the first lines of the script in order as well

1 Like

so if i do that it wont work randoly?

Yeah probably

alr if it doesnt work ill resort to _Fade#

The button function only works after the script ran for 55 seconds. Move it to below the Lib.Button:connect(p, bNo) line.

1 Like

oooh ok i get it

that means put it at the beginning i presume