HintService (Archived) | Legacy hints reimagined, customizable, straight-forward, and simple

I would like the ability to show a card and stop it when an objective has been achieved.
If the card removes itself before the objective is achieved via the setVisibleTime then the function will not meet my needs. That’s what I meant by infinitely shown card.

1 Like

I can change the setVisibleTime function to fit your needs, and make the time argument optional.

Example:

Hint:setVisibleTime(isInfinite : boolean, time : number)

I would say to use math.huge in the time argument instead of a number, but I already tested this and it did not work.

1 Like

Update 1.5!


@Alexplazz

Features:


You can now cancel hints regardless of time left on screen.

You can now display hints infinitely.

Removal of all style methods, you can now use themes. Themes were created so people could easily use other peoples hint themes. Use Hint:setTheme(themeName) to set themes on hints. Read more in the docs

Whats coming v2?

Lots of new things. The complete removal of activation methods, these will be replaced with broadcast methods. These are a bit more straight-forward and contain lots of features.

You will be able to change the type of animation the hint plays, fade, linear, and none.

Events that come with the broadcast functions, Hint.Broadcasted, Hint.BroadcastCancelled, Hint.BroadcastRecieved.

And lots more!

1 Like

This definitely is a simple and beginner friend module with a lot of features for a simple concept. It’s also better than the simple chat hint system you see in games today.

1 Like

Update 2.0!


Features:


Deprecated Activation methods and replaced them with broadcast methods.

Somewhat rewritten the module.

You can now set tween types, fade or none.

You can now get tween types and xAlignments

Docs about new features coming soon!

You should update the code sample. It still uses the old .HintAdded API which is now .HintAdding. Also the parameter to the event callback has the same name as the HS object. Here is an updated sample:

local HS = require(game:GetService("ReplicatedStorage"):FindFirstChild("HintService"))

local NewHint = HS.new("Center") -- Creates a blank, and new hint

HS.HintAdding:Connect(function(label) -- Connect this to a function to detect when a hint is added
    print(string.format("The new hint that was added says '%s'", NewHint:getHintLabel()))
end)

NewHint:setLabel("test") -- Sets the text of NewHint
NewHint:setTweenLength(5, 5) -- Sets how long the animations will last
NewHint:setTweenStyle(Enum.EasingStyle.Linear, Enum.EasingStyle.Linear)  -- Sets the animation styles
NewHint:setTweenDirection(Enum.EasingDirection.In, Enum.EasingDirection.Out) -- Sets the animation directions
NewHint:broadcastHintToClient(false)
1 Like

could you make it a startergui instead of whatever it is? its really hard to figure out whats going on here

1 Like

What do you mean? If you are trying to find it in-game it’s in Players > username > PlayerGui

I mean making it easier to use, like how do i even use it?

It is easy to use. Read the documentation.

Pretty clean, love the design!
May I reccomend you add notifications that display on the left/right of the screen, (that can be configured in a config script etc.)

E.G a notification pops out from the side nicely then fades away, they can also stack like you said!

All in all, lovely design - this would be great if many games used this as it would become a more universal design that all players begin to get used to using and understand what the hints are, a bit like how ROBLOX proximity prompts are!

1 Like

Do you mean the option to be able to hide hints from the client and a for example have a topbar button that displays notifications?

And how to broadcast different hints from server to players?

You can do this already. The client can receive remote events from the server and then each client can display different hints.

Update 2.1.1!


Features:


Various API changes, including the removal of SetDestroyOnFinished to prevent memory leaks, this is now set true by default

You can now change the font of your hint to whatever you please.

You can now get the size of your hint.

Organized the code a bit.

Fixed various minor bugs.

A new post with all updates, they will still be posted here but I suggest you go make sure to be notified when a new update is available. Documentation has also been moved here:

Post: HintService Update Tracker

Update

I recently deployed an update. Thanks for your patience!

Update

I recently deployed an update. Thanks for your patience!

Read More

Update

I recently deployed an update. Thanks for your patience!

Read More

Added warning if HintService is not up-to-date

How can we update while keeping custom theme

All you need to do is drag your theme module out, then insert the new HintService, then drag your custom theme back into the themes folder.