I need help, as I am absolutely lost. I am getting no error, the entire script works except for this one single line, almost as if ROBLOX is ignoring it for some reason. It's painfully confusing and I feel maybe it's just where I put the line or perhaps I wasn't specific enough? If anyone can help, thank you.
The script is inside of a Part, and when you click it a GUI appears. That works fine, but it doesn't modify the Text of the other GUI.
Here is the script, and below that is what my explorer looks like:
CODE:
curobject1 = game.StarterGui.CurrentObjective.Frame.Textstuff script.Parent.ClickDetector.MouseClick:connect(function(plr) curobject1.Text = "CURRENT OBJECTIVE: Find the note." --This line being ignored print("Reading note") intclone:Destroy() local letterclone = game.Lighting.LetterOpened:Clone() letterclone.Parent = plr.PlayerGui end)
EXPLORER: http://i.imgur.com/T37ScP3.jpg
Thanks guys. Appreciate it.
It's not being ignored, it's just that StarterGui isn't where the guis that you see are stored. They're stored in your player's PlayerGui - so you should search for the gui from the player's PlayerGui.
script.Parent.ClickDetector.MouseClick:connect(function(plr) --Define the gui from their PlayerGui local curobject1 = plr.PlayerGui.CurrentObjective.Frame:FindFirstChild('TextStuff') --Make sure it's there, so the script doesn't return an error if it's not there. if curobject1 then curobject1.Text = "CURRENT OBJECTIVE: Find the note." print("Reading note") intclone:Destroy() local letterclone = game.Lighting.LetterOpened:Clone() letterclone.Parent = plr.PlayerGui end end)