Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why wont this script edit Gui?

Problem : This local script will not edit the gui

  • local script is in the value

script

No errors in output

And yes the Value does change, i checked while testing

local Player = game.Players.LocalPlayer
wait(.5)
local PlayerGui = Player:WaitForChild('PlayerGui')
wait(.5)
local Gui2 = PlayerGui:WaitForChild('ScreenGui')
wait(.5)
local Gui = Gui2:WaitForChild('TextLabel')

while wait(.1) do
	
Gui.Text =  script.Parent.Value	
	
	
	
	
	
end

1 answer

Try adding a changed event and connecting it to a function. Now from your question this doesn't seem to be the problem but it might be. So try this script,

local Player = game.Players.LocalPlayer
local Gui = Player:WaitForChild('PlayerGui'):WaitForChild('ScreenGui'):WaitForChild('TextLabel')

script.Parent.Changed:connect(function(value)--changed even and function
    Gui.Text =  script.Parent.Value
end)

If this doesn't work more info might be needed. Good luck though!

1 comment

0

It cut me off from defining GUI. But you get the point. This should hopefully work. But even if this doesn't work use a change event and connect it to a function. Much less lag.

This discussion is preserved as it was. New answers, comments, and votes are closed.