--[iLegimate]-- while true do wait() script.Parent.Text = game:GetService("ServerScriptService").MAINFRAME["HARD_DRIVE"].ValueStorage.ServerAnnouncer end
OUTPUT :
06:32:21.815 - String expected 06:32:21.815 - Script 'Players.Player.PlayerGui.MAIN_TOPGUI.LOADING.Changer', Line 5 06:32:21.815 - Stack End
It should work..No idea why..So please help?
On line 5
, you're setting the Text property of script.Parent
. The Text property must always be set as a string. It looks like in your code that you're setting the Text property to ServerAnnouncer
- an object, or userdata
, rather than actual text.
I'm going to make an assumption that ServerAnnouncer
is a StringValue instance. If this is the case, then you just need to index it's Value property(:
local severAnnouncer = game:GetService("ServerScriptService").MAINFRAME["HARD_DRIVE"].ValueStorage.ServerAnnouncer while wait() do script.Parent.Text = serverAnnouncer.Value --Index the 'Value' Property end
It looks like you're just trying to auto-update some text according to any changes in a stringvalue, correct? If so then I'm going to suggest using the Changed event to change the text. This event only activates when the value of the specified Value object changes - so it's much more efficient.
local severAnnouncer = game:GetService("ServerScriptService").MAINFRAME["HARD_DRIVE"].ValueStorage.ServerAnnouncer serverAnnouncer.Changed:connect(function(change) script.Parent.Text = change --Set it to the change end