Hello, I am writing a Reader Script[local] to apply information from a StringValue called Currentinfo, it's basically a "StatusBar". I have done quite a bit of Debugging myself, I've made sure the ServerScript is doing it's part to apply the String to the Currentinfo value, which it works fine. It's more of the LocalScript that isn't working. I was originally using the .Changed event, which wasn't working properly, was also refusing to Change the TextLable (Header) to the preferred String requested by the ServerScript. I decided to switch to GetPropertyChangedSignal. That seemed to fix most of my issues, only now I have this.
19:50:44.743 - Attempt to connect failed: Passed value is not a function 19:50:44.745 - Stack Begin 19:50:44.746 - Script 'Players.cinemakiller.PlayerGui.BaseGuis.BaseHeader.Header.Reader', Line 9 19:50:44.748 - Stack End 19:50:44.891 - attempt to call a nil value 'Attempt to call a nil value' - This has not origin link, so I can't tell if it's actually apart of it or not; could be from my other running Script, it's not connected to this issue. I can resolve it myself if so.
Heres the Code:
local Currentinfo = game:GetService("ReplicatedStorage"):FindFirstChild("Other").Currentinfo
local Player = game:GetService("Players").LocalPlayer; local Header = Player:FindFirstChild("PlayerGui").BaseGuis.BaseHeader.Header
local function SetHeadder()
if Currentinfo then
local Header = Player:FindFirstChild("PlayerGui").BaseGuis.BaseHeader.Header; if Header then print("Header") end
Header.Text = Currentinfo.Value
end;
end;
Currentinfo:GetPropertyChangedSignal("Value"):Connect(SetHeadder())
Thank you

7 comments
I write my Code in a weird way, I use Semicolons a lot too. It's just me transitioning from another language, I couldn't quite understand your answer, could you rephrase?
just change the last line to Currentinfo:GetPropertyChangedSignal("Value"):Connect(SetHeadder)
That's the same thing
Is it not?
its not, bc you call a function with FunctionName(), but you dont call it in the connection
Oh....... I've been Scripting for four years in Lua... I can't believe I had been so blind, of course. Connect event autoreads the Variable with Parentheses......... I am working on a large project, I am pretty tried after working so hard each day. I'm writing a CoreScript, thanks for snapping me out of it!
yw