iconic-lib/CustomProximityPrompt, a ProximityPrompt wrapper written in Fusion (custom proximity prompts)

iconic-lib/CustomProximityPrompt

CustomProximityPrompt is a client-sided ProximityPrompt wrapper made entirely with Fusion. This system features proper modularization, proper state management, sound support, and reactive default animations. It is part of Iconic Gaming’s set of code assets and systems available to the public, dubbed iconic-lib.

What is Fusion? And why use it for this?

As described on its site,

Fusion is a UI, state management and animation library for Roblox. With Fusion, you define declaratively what you want to see, rather than the steps the computer should take to get there.

Fusion has superior state management and animation systems when compared to default solutions. In this particular case, state management allows for easily adjustable animation and frontend changes, which results in easy-to-create reactive interface.

How is this is customized?

You can customize your proximity prompt UI by going into component code and adjusting values with ease. There are three primary states: ButtonHeldDown, CurrentBarSize, and PromptTransparency. To correctly call back to these states, take advantage of Fusion.Computed and attach it to any property!

For example, this is how size and rotation are handled by default:

Size = Spring(Computed(function()
	return ButtonHeldDown:get() and UDim2.fromScale(0.5, 1) or UDim2.fromScale(1, 1)
end), 20, 0.4),

Rotation = Spring(Computed(function()
	if ButtonHeldDown:get() then
		return -5
	elseif PromptTransparency:get() < 1 then
		return 0
	else
		return 5
	end
end), 30, 0.1),

Because everything is easy to edit, you can make quick 10-minute deployments like this:

Where can I get this?

You can find this, as well as other systems and libraries we’ve made, on our GitHub releases page. You can find the v1.0.0 version of this resource by going to this page.

How do I submit bug reports and feature requests?

If you’re looking to file a bug or drop a suggestion, feel free to open a GitHub issue and the team will hop to it!

Added notes

This is an early-version resource and may not work as expected. Please file bug reports or suggestions if you find any defects in the code or design. This is attributed to Iconic Gaming; attribution is not required, but giving us credit does help! Rather than paying money, you can support the team by checking out our other projects, shown on our site.

55 Likes

Could you add a section at the top of why this is better than ProximityPrompts, and what exactly the features are? I am struggling to see the difference. Aren’t default proximityprompts also customizable?

1 Like

This still uses proximity prompt? Its just changing the ui (style = custom) and maybe added more features.

2 Likes

You still use ProximityPrompts like normal! Put this script in ReplicatedFirst and you’re good to go, no changes or workflow adjustments needed.:+1:

No need to set it to custom! This overrides that.

3 Likes

Could you provide code examples similar to the video showcases you provided?

1 Like

Nevermind, I’m a little under the weather right now and my brain blanked. Cheers!

2 Likes