Hi, so I’ve been trying to make my mouse visible when a store frame is visible but nothing:
my game is combat but when the player has the weapon in the inventory the mouse is no longer available after I put a screengui then a text button and in the properties I put the modal as true and the mouse was free but it was invisible and yes It is invisible so when the round ends the player will not be able to buy weapons and if he does not buy weapons then in the next round he will not be able to do anything
WHAT TRIED?
try making mouse.icon = " "
but nothing I also made the mouse icon was enabled with user input service but it didn’t work at all. but if for some reason I press the “ESC” key then it takes me to the list of players and the mouse is already visible I really don’t understand anything if someone can help me of course and if you have doubts they will be well received
Replace the mouse.icon with the original mouseicon, make a variable
local originalmouseicon = mouse.icon
the problem is that the mouse actually destroys it and i need to replace it
What do you mean by “destroy” and does it remove the image of mouseicon or the mouse it self.
I think I delete the image because the mouse is still working but invisible
What you should do is what i said, before the mouse destroys it self, create a variable and put it as mouseicon
Hello, would it be possible for you to share your script? It would make it easier to understand the issue.
if cursorImageValueObj then
cursorImageValueObj:Destroy()
This is part of the script for the weapon so that the player can fight better and more comfortably, but at the time of purchase, it cannot be done because the mouse is invisible. Does anyone know how to do such a thing?
Perhaps utilize UserInputService.MouseIconEnabled as you did inside the weapon script to disable the mouse icon instead of destroying the CursorImage StringValue.
Mouse.Icon = "rbxasset://SystemCursors/Arrow"
try this? more information here if you want other icons:
https://create.roblox.com/docs/reference/engine/classes/Mouse#Icon
and if I leave it like this destroyed I can’t create another mouse
Maybe just leave the image mouse icon as = “” instead of :DESTroy()
try using UserInputService.MouseIconEnabled
maybe
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.