How can I change the cursor system or make it enabled

hello,
my game is a shooting game which consists of: the players appear and immediately a frame becomes visible in the user interface which is to buy weapons but what happens is that when a player buys a weapon the cursor disappears for I don’t know if the weapon script is the camera or the mouse icon. If you have doubts I will answer you or if you have any simple idea that you consider silly, tell me please, I hope this topic fills up and then I can clarify the topic, thank you very much and I don’t ask for scripts not even the work done as it says in the category is support but not a spoon in the mouth thank you very much and have a good day

To access the player’s camera, you need to use CurrentCamera from a LocalScript.

2 Likes

but I already tried it in such an example way:
a first person game in which the mouse cursor is not available but when a frame is activated then it becomes available

What exactly is it that you’re trying to achieve?

1 Like

thanks for asking… you know my game is a gun game and if a gun is a child of the player’s backpack then the cursor disappears and becomes a scope. You don’t know how to make when the frame store is visible the mouse cursor is enabled and reappears?

Are you using a free model gun? (Never heard of cursors turning into scopes, or you may be activating shiftlock) If so there are scripts which modify the cursor and you’ll have to change or delete those

1 Like

You don’t know how I can disable shift lock through a script?

1 Like

You can but you don’t need a script. Go to StarterPlayer and uncheck EnableMouseLockOption

1 Like

And it could be done through a script. I hardly know how to do it.

Player.DevEnableMouseLock = false

1 Like

thanks for the help but it didn’t work the problem is like when you put it in first person the camera didn’t block but the mouse movement is disabled

Ah I see what you mean. Make a text button and put it anywhere, make it transparent, and check Modal to true

1 Like

that is, if a frame is visible then the mouse is enabled that is what it means

and where is this modal ? please

Properties of the text button

character limit

1 Like

hello thank you very much bro I really love you thank you very much now I can move it freely but I have another problem when the mouse is free the mouse is invisible, how would I make it visible?

game:GetService("UserInputService").MouseIconEnabled = true

1 Like

You know, I’ve been very upset, I know, but I need your help.
I already tried but I think that was not the problem the mouse was free and I could press buttons but the problem is that it is invisible please I need your help and thank you very much for your understanding

Keep the string empty and the mouse will return to its default

local mouse = player:GetMouse()
mouse.Icon = ""
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.