So I'm making a system that displays GUIs on a specific event (that is if wallValue - a ModuleScipt value - is = 0)
ShowQuestion.OnClientEvent:Connect(function()
answerA.ImageColor3 = Color3.new(1, 1, 1)
answerB.ImageColor3 = Color3.new(1, 1, 1)
answerC.ImageColor3 = Color3.new(1, 1, 1)
answerC2.ImageColor3 = Color3.new(1, 1, 1)
answerD.ImageColor3 = Color3.new(1, 1, 1)
if values.wallValue == 0 then
print(values.what)
question.ImageTransparency = 0.3
question.question.TextTransparency = 0
wait(4)
answerA.ImageTransparency = 0.3
answerA.TextLabel.TextTransparency = 0
answerA.TextLabel.Text = game.Workspace.Screen.SurfaceGui.a1_2.Text
wait(1.5)
answerB.ImageTransparency = 0.3
answerB.TextLabel.TextTransparency = 0
answerB.TextLabel.Text = game.Workspace.Screen.SurfaceGui.a2_3.Text
end
end)
From what I have read, you cannot use ModuleScript values inside of a LocalScript, and of course, the code does not run the way I want it to even if wallValue /= 0, the whole snippet inside of the If statement still runs anyways). Is there a way that I can use the ModuleScript values for the If Then statements without having to resort to alternative options like using multiple RemoteEvents?
