Custom Cursor [Simple Cursor Application]

A Custom Cursor application.

Uses Render Stepped to update a image every frame.

Uses:
The main purpose for this is to expand upon normal cursor applications and allow things such as UI Effects on your cursor, Besides that this is absolute due to “Mouse Icon”

Pros:
Simple.
Optimized.
Smoother Cursor Movement.

Cons:
Trying to do anything UI related with this will create extra random instances…
Kind of Unnecessary

Preview Code:

--//Services
local UserInputService = game:GetService("UserInputService")
local GuiService = game:GetService("GuiService")
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

--//Variables
local GuiInset = GuiService:GetGuiInset()
local Icon = script.Parent.Cursor


--//UserInputService
UserInputService.MouseIconEnabled = false


--//Runservice
RunService.RenderStepped:Connect(function(DeltaTime)
	
	--Define
	local MousePosition = UserInputService:GetMouseLocation() - GuiInset
	
	--Set
	Icon.Position = UDim2.fromOffset(MousePosition.X,MousePosition.Y)
	
end)

Rbxm File:
CustomCursor.rbxm

1 Like

why not just game:GetService("UserInputService").MouseIcon = icon

3 Likes

Are you talking about getting the service then doing

“UserInputService.MouseIconEnabled = false”

Or

Using UserInputService.MouseIcon = IdHere

Hmm yes this would probably be much better due to not having a loop run in the background

Ah sorry, The reason i made this is not to just set your cursor but so you can make interactive effects such as click tweens and the such

1 Like

What do you mean by click tweens?

Expanding the cursor or applying effects when certain actions happpen such as
Ex:
Clicking a Ui Button
Clicking in general