How can I change the Shift Lock Icon?

I am trying to make a two-way gun system where you can use the gun in first person, and use the weapon in shift lock.

I’m trying to have the Shift Lock Icon disabled/set to an invisible decal. From there, I would enable a UI that would essentially be the new icon.

Are there any ideas on how I can go on about this?

5 Likes

Hit Play [F5] inside Roblox Studio and copy the script PlayerModule inside Players > your name > PlayerScripts.
Once you’re done with that, hit Stop [Shift + F5] and paste it inside StarterPlayer > StarterPlayerScripts.
Finally, go inside StarterPlayer > StarterPlayerScripts > PlayerModule > CameraModule > MouseLockController and change this line

local DEFAULT_MOUSE_LOCK_CURSOR = "rbxasset://textures/MouseLockedCursor.png"

to

local DEFAULT_MOUSE_LOCK_CURSOR = ""
32 Likes

It works perfectly. Thanks a lot!

1 Like

I know this was already solved, but you could also do this:

game:GetService(“UserInputService”).MouseIconEnabled = false
local image = Instance.new(“ImageLabel”,player.PlayerGui.ScreenGui)
image.Image = yourImageIdHere
image.AnchorPoint = Vector2.new(.5,.5)
image.Position = UDim2.fromScale(.5,.5)

2 Likes

Would you be able to do the same with the mouse/cursor?

Yeah, for regular cursors it’s even easier.
Put this inside a LocalScript in StarterPack and put this is the code:

wait() --necessary wait
--wait() --if the cursor still bugs remove the two dashes at the start of the line
game.Players.LocalPlayer:GetMouse().Icon = image_id

Where would I put the script at also would it be a localscript or regular?

LocalScript.
And it has to be in StarterPack as if you were adding a tool. You don’t need to insert it into a tool though.

This is because if the cursor loads too fast, then Roblox cursor will override that, and Instances inside StarterGear will load after the character. By that the default Roblox cursor should be loaded.

That would just change the icon.