HintService Documentation
Constructors
.new()
Function: HintService.new()
Description: Creates a new hint.
Setting Methods
:setTopLeft()
Function .new(args):setTopLeft()
Description: Sets the hint to be aligned to the function’s said position.
:setTopCenter()
Function .new(args):setTopCenter()
Description: Sets the hint to be aligned to the function’s said position.
:setTopRight()
Function .new(args):setTopRight()
Description: Sets the hint to be aligned to the function’s said position.
:setBottomLeft()
Function .new(args):setBottomLeft()
Description: Sets the hint to be aligned to the function’s said position.
:setBottomCenter()
Function .new(args):setBottomCenter()
Description: Sets the hint to be aligned to the function’s said position.
:setBottomRight()
Function .new(args):setBottomRight()
Description: Sets the hint to be aligned to the function’s said position.
:setCanClick()
Function .new(args):setCanClick(enabled : boolean)
Description: Sets canClick
to “enabled”, allowing you to use the .Clicked
event.
enabled: Whether canClick
is enabled.
:setText()
Function .new(args):setText(text : string)
Description: Sets the text of a hint to “text”.
text: The hint’s text.
:setBroadcastTime()
Function .new(args):setBroadcastTime(isInfinite : boolean, time : number)
Description: Sets how long the hint should be shown on screen.
isInfinite: Determines whether the hint will be infinitely displayed.
time: The amount of time the hint is shown on screen.
:setRichText()
Function .new(args):setRichText(enabled : boolean)
Description: Sets the RichText value of the hint to “enabled”.
enabled: Determines whether RichText is enabled or not.
:setBroadcastFinished()
Function .new(args):setBroadcastFinished(destroy : boolean)
Description: Sets the DestroyOnFinish value of the hint to “enabled”.
destroy: Determines whether DestroyOnFinish is enabled or not.
:setTweenLength()
Function .new(args):setHintStroke(length1 : number, length2 : number)
Description: Sets how long the animation fading of the hint should be.
length1: How long the animation should be on adding.
length2: How long the animation should be on removing.
:setTweenDirection()
Function .new(args):setTweenDirection(direction1 : Enum.EasingDirection, direction2 : Enum.EasingDirection)
Description: Sets the direction of the fading animation of the hint should go in.
direction1: What the direction of the animation should be on adding.
direction2: What the direction of the animation should be on removing.
:setTweenStyle()
Function .new(args):setTweenStyle(style1 : Enum.EasingStyle, style2 : Enum.EasingStyle)
Description: Sets the style of the fading animation should be.
style1: What the style of the animation should be on adding.
style2: What the style of the animation should be on adding.
:setTweenType()
Function .new(args):setTweenStyle(type : "Fade" | "None")
Description: Sets what type the animation should be.
type: 2 strings that determine the type of the animation
:setTheme()
Function .new(args):setTheme(theme : string)
Description: Sets the theme of the hint to "theme. The thread will error if the theme does not exist in the Themes folder.
theme: The name of the theme module.
.setDebounceTime()
Function .setDebounceTime(time : number)
Description: Sets the debounce time of when a hint can be broadcasted after another.
time: The amount of time between possible broadcast scenarios
Getting Methods
:getLabel()
Function .new(args):getHintLabel(): string
Description: Returns the hint label.
.getBroadcastedHints()
Function .getBroadcastedHints(): table
Description: Returns all of the hints in a table when called regardless of being added or removed.
:getVisibleTime()
Function .new(args):getVisibleTime(): number
Description: Returns the visible time of the hint.
:getTweenLength()
Function .new(args):getTweenLength(type : string): number
Description: Returns the hint animation length. Choose 1 for adding, and 2 for removing.
:getTweenDirection()
Function .new(args):getTweenDirection(type : string): Enum.EasingDirection
Description: Returns the direction type for the animation. Choose 1 for adding, and 2 for removing.
:getTweenStyle()
Function .new(args):getTweenStyle(type : string): Enum.EasingStyle
Description: Returns the style for the animation. Choose 1 for adding, and 2 for removing.
:getRichTextEnabled()
Function .new(args):getRichTextEnabled(): boolean
Description: Returns the boolean of the ‘RichText’ property.
:getHintAlignment()
Function .new(args):getHintAlignment(): number
Description: Returns the alignment of the hint.
Returns: 1: BottomLeft, 2: BottomCenter, 3: BottomRight, 4: TopLeft, 5: TopCenter, 6: TopRight.
:getTheme()
Function .new(args):getTheme(): ModuleScript
Description: Returns the theme module script that was set.
:getHintSize()
Function .new(args):getHintSize(): Vector2
Description: Returns the X and Y size of the hint. (Y is always 30)
:getIsBroadcasted()
Function .new(args):getIsBroadcasted(): boolean
Description: Returns whether the hint has been broadcasted or not.
Broadcast Methods
:broadcast()
Function .new(args):broadcast(yieldThreadUntilHintFinished : boolean)
Description: Broadcasts the hint to the local machine.
yieldThreadUntilHintFinished: Determines whether the function will yield the thread.
:cancelBroadcast()
Function .new(args):cancelBroadcast()
Description: Cancels the broadcast regardless of time left on screen.
RBXScriptSignals
WARNING: Make sure all RBXScriptSignals
are above any broadcast methods or they will fail to work the first time.
.HintAdding
Function HintService.HintAdding:Connect(): hint
Description: Fires immediately before a hint is added.
.HintRemoving
Function HintService.HintRemoving:Connect(): hint
Description: Fires immediately before a hint is removed.
.BroadcastCancelled
Function .new(args).BroadcastCancelled:Connect()
Description: Fires immediately before the hint is cancelled.
.BroadcastRecieved
Function .new(args).BroadcastRecieved:Connect()
Description: Fires when the hint was broadcasted successfully.
.Broadcasted
Function .new(args).Broadcasted:Connect()
Description: Fires immediately before the hint is broadcasted.
.Clicked
Function .new(args).Clicked:Connect()
Description: Fires immediately when a hint is clicked, only if canClick
is enabled.
Warnings
We encourage you to use the newest version of HintService.
How do I know when its updated?
A warning will be created in the output saying that it’s not up-to-date.