Hello!
Problem:
Normally, the users mouse would be hidden until they press “Q,” which would make the mouse icon visible and make the mouse movable using “Enum.MouseBehavior.Default”
Other aspects like making the mouse visible work.
What I’ve Tried
- Changing the camera zoom and camera mode to 0 so the mouse can move at least.
local UIS = game:GetService("UserInputService")
local Mouse = game.Players.LocalPlayer:GetMouse()
--[[
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Parent.StatsFrame.Visible = not script.Parent.Parent.Parent.StatsFrame.Visible
end)
]]
UIS.InputBegan:Connect(function(Input, Chatted)
if Chatted then --Chatted is a bool (True/False)
return --We want to check
end
if Input.KeyCode == Enum.KeyCode.Q then
script.Parent.Parent.Parent.StatsFrame.Visible = not script.Parent.Parent.Parent.StatsFrame.Visible
end
if script.Parent.Parent.Parent.StatsFrame.Visible == true then
UIS.MouseIconEnabled = true
UIS.MouseBehavior = Enum.MouseBehavior.Default
else
UIS.MouseIconEnabled = false
UIS.MouseBehavior = Enum.MouseBehavior.LockCenter
end
end)
If you have question or possible solution, please send it under!
Thank You!