why hello there, I I have little bit of problems going on with my game’s random welcome screen random text. it was supposed to decide on letters and stop running but instead the script runs more then once and it forms weird hunk of random words, kinda like this. (I suck at scripting so bad)
I have tried to look for other topics related to math.random script but I couldn’t find any that could be supported with my script, which is shown in below.
local tip1 = script.Parent.Text1 --these local tips are welcome screen random tips and there is 15 of them, and it was supposed to show one text per one session, but the script keep repeating the thing,
local tip2 = script.Parent.Text2
local tip3 = script.Parent.Text3
local tip4 = script.Parent.Text4
local tip5 = script.Parent.Text5
local tip6 = script.Parent.Text6
local tip7 = script.Parent.Text7
local tip8 = script.Parent.Text8
local tip9 = script.Parent.Text9
local tip10 = script.Parent.Text10
local tip11 = script.Parent.Text11
local tip12 = script.Parent.Text12
local tip13 = script.Parent.Text13
local tip14 = script.Parent.Text14
local tip15 = script.Parent.Text15
while true do
local randomtip = math.random(1,15) --the script I'm wishing to fix it
wait(0.1)
if randomtip == 1 then
tip1.Visible = true
end
if randomtip == 2 then
tip2.Visible = true
end
if randomtip == 3 then
tip3.Visible = true
end
if randomtip == 4 then
tip4.Visible = true
end
if randomtip == 5 then
tip5.Visible = true
end
if randomtip == 6 then
tip6.Visible = true
end
if randomtip == 7 then
tip7.Visible = true
end
if randomtip == 8 then
tip8.Visible = true
end
if randomtip == 9 then
tip9.Visible = true
end
if randomtip == 10 then
tip10.Visible = true
end
if randomtip == 11 then
tip11.Visible = true
end
if randomtip == 12 then
tip12.Visible = true
end
if randomtip == 13 then
tip13.Visible = true
end
if randomtip == 14 then
tip14.Visible = true
end
if randomtip == 15 then
tip15.Visible = true
end
end
and thank you for reading all of these again, I couldn’t script alone so your help is gladly needed, thank you. -mari