Mouse Icon changing when looking at a proximity prompt

How could I make the player’s mouse icon change when a proximity prompt pops up and then change back to normal when looking away from the proximity prompt? (The mouse icon will be custom)

You’d need to use a remote event that fires to the client from your proximity prompt script. From there you can connect the remote to the client event to change your mouse. If you’ve never used remote events before then this will be a good introduction to what they are and how they work. Good luck.

1 Like

There’s a way you can do this without the need to use RemoteEvents, but for it to work you’ll have to follow these steps carefully:

  1. Create a server Script and parent it to the ProximityPrompt
  2. Set the Script’s RunContext property to Client in the Properties tab in Studio
  3. Inside of the Script write:
local UserInputService = game:GetService("UserInputService")

local proximityPrompt = script.Parent

local function onPromptShown()
	UserInputService.MouseIcon = "rbxassetid://8688840964" -- Change to match your image ID
end

local function onPromptHidden()
	UserInputService.MouseIcon = "" -- A blank string value for UserInputService.MouseIcon is equivalent to the default mouse icon
end

proximityPrompt.PromptShown:Connect(onPromptShown)
proximityPrompt.PromptHidden:Connect(onPromptHidden)

@PinguinulKaboom You can follow these steps if you prefer to use this method :slight_smile::+1:

1 Like