Noticed some confusion about ways to display help text and why you’d want to use one way over another, so here’s some snippet that I’d use to display help text.
Option 1 (looped)
CreateThread(function()
while true do
Wait(0)
-- if statement here
BeginTextCommandDisplayHelp("THREESTRINGS")
AddTextComponentSubstringPlayerName("line one")
AddTextComponentSubstringPlayerName("line two")
AddTextComponentSubstringPlayerName("line three")
-- shape (always 0), loop (bool), makeSound (bool), duration (0 for loop)
EndTextCommandDisplayHelp(0, true, false, 0)
end
end)
Option 2 (non-looped)
function message(lineOne, lineTwo, lineThree, duration)
BeginTextCommandDisplayHelp("THREESTRINGS")
AddTextComponentSubstringPlayerName(lineOne)
AddTextComponentSubstringPlayerName(lineTwo or "")
AddTextComponentSubstringPlayerName(lineThree or "")
-- shape (always 0), loop (bool), makeSound (bool), duration (5000 max 5 sec)
EndTextCommandDisplayHelp(0, false, true, duration or 5000)
end
Option 3 (looped, but with labels or a custom text string using AddTextEntry, detailed info about labels can be found here, existing labels dump here)
CreateThread(function()
-- only call this once!! (or skip this if you want to use an existing label)
-- if you register this in some other script then you don't need to re-register this here.
AddTextEntry("some_unique_name_never_used_anywhere_else", "The message you want to be displayed")
while true do
Wait(0)
-- if statement here
DisplayHelpTextThisFrame("some_unique_name_never_used_anywhere_else", false)
end
end)