I have been trying to make a model that will change text every second/hour that the player chooses. then I realize that my scripts does not work, Do you know why? Both scripts are server scripts

script 1:

local F1 = script.Parent.Parent.Values

F1.RandomText.Value = true -- Change this to true/false if you want the text to change ever


F1.Time.Value = true -- Change this to true/false if you want the text and the color to change in a specific time

local TimeValue = 5 --Change the number to the number you wait until it changes again



		--Random Texts--
if F1.RandomText == false then
	return
end

if F1.RandomText == true then
	while true do
		F1.RandomTextValue.Value = math.random(1,2,3,4,5)
		wait(TimeValue)
	end
end

if F1.RandomText == true then
	if F1.RandomTextValue == 1 then
		script.Parent.Parent.Brick.SurfaceGui.TextLabel.Text = ("Hello!") -- Change the text in the "" to the first text
	end
end

if F1.RandomText == true then
	if F1.RandomTextValue == 2 then
		script.Parent.Parent.Brick.SurfaceGui.TextLabel.Text = ("This was made by zippe8") -- Change the text in the "" to the second text
	end
end

if F1.RandomText == true then
	if F1.RandomTextValue == 3 then
		script.Parent.Parent.Brick.SurfaceGui.TextLabel.Text = ("some cool model I made") -- Change the text in the "" to the third text
	end
end

if F1.RandomText == true then
	if F1.RandomTextValue == 4 then
		script.Parent.Parent.Brick.SurfaceGui.TextLabel.Text = ("Open the folder in explorer and then open openfolder and then read help") -- Change the text in the "" to the fourth text
	end
end

if F1.RandomText == true then
	if F1.RandomTextValue == 5 then
		script.Parent.Parent.Brick.SurfaceGui.TextLabel.Text = ("idk what to put here") -- Change the text in the "" to the fifth text
	end
end

script 2 (mostly to make the scripts work properly)

--This script is functioning some of the settings script--

local Values = script.Parent.Values
local RandomTextEnabled = Values.RandomText
local TimeEnabled = Values.Time
local RandomText = Values.RandomTextValue
local Text = script.Parent.Brick.SurfaceGui.TextLabel

--If not enabled--

if RandomTextEnabled == false then
	RandomText = nil
end

if TimeEnabled == false then
	Time = nil
end

2 comments

0

any errors? nobody's gonna read all of that

0

Puppy44 there is no errors that show up, otherwise I would look the error up.