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

When i enter the correct code, it says its wrong. How do i fix it?

Asked by 2 years ago
Edited 2 years ago
01-- locals
02local text=script.Parent.input
03local buttons=text.Parent.buttons
04 
05-- setup
06local r=math.random(1,5)
07if r==1 then code=2928 end if r==2 then code=9742 end if r==3 then code=2437 end if r==4 then code=5975 end if r==5 then code=4443 end
08local input_code=""
09text.Text=input_code
10workspace["gameSetup_(v1)"].game.required.paper.text.text.Text="Uh, hey, Jack! U always forget the passcode for the door, the code is: "..code
11 
12-- handler
13for i,button in pairs(buttons:GetChildren()) do
14    button.MouseButton1Click:Connect(function()
15        if tonumber(button.Name) and text.Parent.Parent.BrickColor==BrickColor.new("Steel blue") then
View all 41 lines...

Answer this question