Script doesnt work when value is true

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I have a gui which correctly changes the value to true, but the script doesnt work.
  2. What is the issue? Include screenshots / videos if possible!
    GUI:
    function Click()
    workspace.OpeningPyro.OpeningValue.Value = true
    end

script.Parent.MouseButton1Down:connect(Click)
Model Script:
while true do
wait()
local Stage = script.Parent.StagePyro
local Top = script.Parent.TopTronPyro
local Side = script.Parent.SideTronPyro
local Middle = script.Parent.MiddleTronPyro

if script.Parent.OpeningValue.Value == true then
–//SmackDown Opening Pyro | Rafter Top Sides
Top.Pyro1.FWork.Enabled = true
Top.Pyro2.FWork.Enabled = true
Top.Pyro3.FWork.Enabled = false
Top.Pyro4.FWork.Enabled = false
Top.Pyro5.FWork.Enabled = false
Top.Pyro6.FWork.Enabled = false
Top.Pyro7.FWork.Enabled = false
Top.Pyro8.FWork.Enabled = false
wait(0.5)
Screenshot 2021-02-02 at 16.06.26
3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

-- This is an example Lua code block

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

If you’re changing the value from a Local Script, the server isn’t going see it because of replication.

What should I do then? Should I make it a normal script?

If you absolutely need a local script, use RemoteEvents, otherwise, yes, use a normal script

1 Like