Before I provide my code, I want to give some context.
I have a LocalScript inside of an ImageButton in a GUI. Once this button is pressed, among other functions, it sets a Bool value to true, which is inside of a part in the Workspace. (this is my way of working around BindableEvents because I'm lazy). There is another Script inside the part which has a loop that waits for the value to change.
Once the value successfully is changed by the LocalScript in the GUI, nothing is printed in the output. Does my loop not work?
Script inside of Part:
local CamBool = script.Parent.CamBool
repeat wait() until CamBool.Value == true
print("test")
LocalScript inside of ImageButton:
local Start = game.StarterGui.TitleGUI
local Unclicked = script.Parent
local Clicked = script.Parent.Parent.ButtonClicked
local Title = script.Parent.Parent.Title
local Blur = game.Lighting["TitleGUI blur"]
local dssbool = game.StarterGui.dssbool
local tutbool = game.StarterGui.tutbool
local CamBool = game.Workspace.CameraPart.CamBool
Unclicked.MouseButton1Click:Connect(function()
Unclicked.Visible=false
Clicked.Visible=true
wait(0.2)
Clicked.Visible=false
Unclicked.Visible=true
wait(0.1)
Title.Visible=false
Blur.Enabled=false
Clicked.Visible=false
Unclicked.Visible=false
if dssbool.Value == true then
tutbool.Value = true
CamBool.Value = true
print("tutbool value changed")
else
print("Tutorial will not be executed, because player is not new.")
end
end)
By the way, dssbool is a bool value that is changed if a player joins for the first time, this is to execute a tutorial. I guess I don't need the tutbool, but that's irrelevant. My problem is that even when CamBool's value is changed, "test" isn't printed.

4 comments
Thank you so much! I'll try to incorperate RemoteEvents into more of my game :)
Uh oh, it seems like everything stopped working lol
Uh oh, it seems like everything stopped working lol, I think the game is waiting for the Child RemoteEvent in line 6 of the LocalScript and is not running any other code
Are you sure you created a RemoteEvent inside ReplicatedStorage? If yes, did you change its name? If yes, change the "RemoteEvent" to the new name