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

When the code is disabled the text should change but it's not doing it and i don't understand why??

(This is in a server script) These are just the lines of code that are broken How is it not changing the text I don't get it. and yes the code is disabled

	if game.ServerScriptService.StarterGlass.BreakScript.Disabled == true then
	player.PlayerGui:FindFirstChild("Tutorial").Frame.Info.Text = "Good!"

1 answer

✓ Accepted answer

In this script, it checks if is disabled just a fraction of a second when the server starts. You should hook it up to an event or a loop. Like this.

while true do
wait(1)
if game.ServerScriptService.StarterGlass.BreakScript.Disabled == true then
player.PlayerGui:FindFirstChild("Tutorial").Frame.Info.Text = "Good!"
end

I am using wait(1) to make sure it does not lag anything. This is not tested, so it might not be 100% accurate.

3 comments

0

Oh thank i thinked of it but i thougth that would not be the problem.

1

You should use GetPropertyChangedSignal for Disabled.

0

Oh, forgot to say it just times out and the script stops working.

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