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

ScreenGUI script STILL, STILL not working in server. Why?

Asked by 10 years ago

Still not working.

Because I wasn't actually told what to change,but here's what I've got.

function onclick()


if script.Parent.Value1.Value ==1 then


script.Parent.Value1.Value =2


script.Parent.UI.Visible =true
script.Parent.UIcover.Visible =true
script.Parent.UIselection.Visible =true
script.Parent.OmnitrixOpen.Visible =false

script.Parent.ActivateSound:Play()



elseif script.Parent.Value1.Value ==2 then



script.Parent.Value1.Value =3


script.Parent.UI.Visible =false
script.Parent.UIcover.Visible =false
script.Parent.UIselection.Visible =false
script.Parent.OmnitrixOpen.Visible =true

script.Parent.ScrollSound2:Play()




elseif script.Parent.Value1.Value ==3 then


script.Parent.Value1.Value =4

script.Parent.TransformSound:Play()

script.Parent.OmnitrixGreenLight.Visible =true
script.Parent.LidGreenLight.Visible =true

script.Parent.OmnitrixGreenLight.ImageTransparency =1
script.Parent.LidGreenLight.ImageTransparency =1
wait (0.1)
script.Parent.OmnitrixGreenLight.ImageTransparency =0.75
script.Parent.LidGreenLight.ImageTransparency =0.75
wait (0.1)
script.Parent.OmnitrixGreenLight.ImageTransparency =0.5
script.Parent.LidGreenLight.ImageTransparency =0.5
wait (0.1)
script.Parent.OmnitrixGreenLight.ImageTransparency =0.25
script.Parent.LidGreenLight.ImageTransparency =0.25
wait (0.5)
script.Parent.OmnitrixGreenLight.ImageTransparency =0.25
script.Parent.LidGreenLight.ImageTransparency =0.25
wait (0.1)
script.Parent.OmnitrixGreenLight.ImageTransparency =0.5
script.Parent.LidGreenLight.ImageTransparency =0.5
wait (0.1)
script.Parent.OmnitrixGreenLight.ImageTransparency =0.75
script.Parent.LidGreenLight.ImageTransparency =0.75
wait (0.1)
script.Parent.OmnitrixGreenLight.ImageTransparency =1
script.Parent.LidGreenLight.ImageTransparency =1

script.Parent.OmnitrixGreenLight.Visible =false
script.Parent.LidGreenLight.Visible =false



elseif script.Parent.Value1.Value ==4 then


script.Parent.Value1.Value =1

script.Parent.TransformSound:Play()

script.Parent.OmnitrixRedLight.Visible =true

script.Parent.LidRedLight.Visible =true

script.Parent.OmnitrixRedLight.ImageTransparency =1
script.Parent.LidRedLight.ImageTransparency =1
wait (0.1)
script.Parent.OmnitrixRedLight.ImageTransparency =0.75
script.Parent.LidRedLight.ImageTransparency =0.75

wait (0.1)
script.Parent.OmnitrixRedLight.ImageTransparency =0.5
script.Parent.LidRedLight.ImageTransparency =0.5

wait (0.1)
script.Parent.OmnitrixRedLight.ImageTransparency =0.25
script.Parent.LidRedLight.ImageTransparency =0.25

wait (0.5)
script.Parent.OmnitrixRedLight.ImageTransparency =0.25
script.Parent.LidRedLight.ImageTransparency =0.25

wait (0.1)
script.Parent.OmnitrixRedLight.ImageTransparency =0.5
script.Parent.LidRedLight.ImageTransparency =0.5

wait (0.1)
script.Parent.OmnitrixRedLight.ImageTransparency =0.75
script.Parent.LidRedLight.ImageTransparency =0.75

wait (0.1)
script.Parent.OmnitrixRedLight.ImageTransparency =1
script.Parent.LidRedLight.ImageTransparency =1


script.Parent.OmnitrixRedLight.Visible =false
script.Parent.OmnitrixOpen.Visible =false
script.Parent.LidRedLight.Visible =false
end
end

script.Parent.Activate.MouseButton1Down:connect(onclick)


1 answer

Log in to vote
0
Answered by
Redbullusa 1580 Moderation Voter
10 years ago

There's nothing in the onclick() function.

function onclick()
        -- Hm, where dey at doe?
end

-- Your 'if' statement

script.Parent.Activate.MouseButton1Down:connect(onclick)

When the script is running, it is saying that if something meets the requirements, then the 'if' statement will run. Then if the 'Activate' button is clicked, then the 'onclick()' function will run.

But there's nothing in it.

function onclick()
    -- Your 'if' statement probably belongs right here.
    -- Then all of your 'elseifs'
end

script.Parent.Activate.MouseButton1Down:connect(onclick)
0
Still not working, friend. ATropicalMango 0 — 10y
0
Anything in the output? Redbullusa 1580 — 10y
Ad

Answer this question