Changing the mouse cursor for a first-person game

Hello. I’m making this game where you are in a house on a dark night. It’s not finished yet, but I’d like to know how I can change the mouse to be a small circle instead of this big arrow.

Hopefully it will work with click detectors as well, since in the game you have to shut the lights off in the house.

Here is an image of the big ugly mouse:


Thank you in advance! : D

8 Likes

To change the Mouse Icon you can simply use the Player’s Mouse service for that.

This will only work in a Local Script

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

mouse.Icon = "rbxassetid://0000000"
15 Likes

Does that go into player scripts or starter gui?

2 Likes

Any local script will do. StarterPlayerScripts is what I would put it in.

4 Likes

Ahh thank you! I think this will work, I’ll come back if it does.

1 Like

image This is the service if you’re having trouble finding it.

3 Likes

Alright I will wait a few minutes after I upload the picture.

very helpful thanks

Here try this asset “rbxassetid://138865017” it is a crosshair.

oof it doesn’t want to load time for waiting game

The game isn’t loading? Or is it something to do with the script?

You can insert this in a localscript put inside of StarterPlayerScripts:

local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Icon = "http://www.roblox.com/asset?id=163023520"

Replace the asset ID with one of a circle, or any other decal.

1 Like

It is recommended that you use rbxassetid://0000000

They do the same thing. rbxassetid is a convenience content URL shorthand for the full (and proper) link, which is up there. It’s not recommended necessarily, it’s just preferred by most. I do believe Studio also converts it to this shorthand.

https://developer.roblox.com/en-us/articles/Content

1 Like

Sorry, I meant I recommend it because it is easier to use.