[SOLVED] Disable Cursor when Player on entrance and enable Cursor after 10 seconds

  1. How would I make the Players pointer/cursor disabled at first 10 seconds of being in the game then after those 10 seconds the mouse cursor will enable.
  2. How to disable cursor on a certain Gui Layout after 10 seconds the cursor will enable.
3 Likes

do you want it to be invisible or do you want it to be disabled?

Which will be the best performance doing so?

idk but i dont think small changes like that will affect performance.

But do you want the cursor to be invisible or able to click everywhere?

Invisible so the cursor cannot be seen by any Players during the first 10 seconds of the game because during those 10 seconds the Loading Screen will be apparent.

Currently at the moment the cursor is visible to the aspect of the Loading Screen which will then fade into the gameplay.

You can use UserInputService.MouseIconEnabled property to configure the mouse icon. It shouldn’t have any performance issues whatsoever.

If it’s any easier would you want me to show you the Loading Screen Script?

i found documentation about this docs
try this

local UserInputService = game:GetService("UserInputService")
UserInputService.MouseIconEnabled = false

You can basically set it to false in the beginning of your script, then set it to true after 10 seconds.

@TheRealANDRO @christofferlt
This is the Script for the Loading Screen Gui:

-- LoadingGui Script
wait (10) 
for i = 0,1,0.1 do
	script.Parent.Transparency = i
	wait(0.02)
end
script.Parent.Visible = false
script.Parent.LoadingText.Visible = false
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, true)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)```

Following on that here’s the Cursor Script:

-- Press "V" to unlock/lock the players Mouse
-- VToUnlock/LockMouse Script
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

game.Workspace:WaitForChild(player.Name)
player.PlayerGui:WaitForChild("FreeMouse")
player.PlayerGui.FreeMouse:WaitForChild("ModalOption")

mouse.KeyDown:connect(function(key)
	if key == "v" then
		if player.PlayerGui.FreeMouse.ModalOption.Modal == false then
			player.PlayerGui.FreeMouse.ModalOption.Modal = true
		else
			player.PlayerGui.FreeMouse.ModalOption.Modal = false
		end
	end
end)

-- Enable the Cursor Script
local uis = game:GetService("UserInputService")
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Icon = "rbxassetid://15096364738" -- Custom Cursor ID
uis.MouseIconEnabled = true```

Here ya go.

local UserInputService = game:GetService("UserInputService")

UserInputService.MouseIconEnabled = false
task.wait(10)
UserInputService.MouseIconEnabled = true
for i = 0,1,0.1 do
	script.Parent.Transparency = i
	wait(0.02)
end
script.Parent.Visible = false
script.Parent.LoadingText.Visible = false
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, true)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
1 Like

It still shows up on the Loading Screen

-- LoadingGui Script
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false)

wait (10) 
for i = 0,1,0.1 do
	script.Parent.Transparency = i
	wait(0.02)
end

local UserInputService = game:GetService("UserInputService")

UserInputService.MouseIconEnabled = false
task.wait(10)
UserInputService.MouseIconEnabled = true
for i = 0,1,0.1 do
	script.Parent.Transparency = i
	wait(0.02)
end
script.Parent.Visible = false
script.Parent.LoadingText.Visible = false
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, true)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)```

You’ve placed it in the wrong place.

local UserInputService = game:GetService("UserInputService")

-- LoadingGui Script
UserInputService.MouseIconEnabled = false
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false)

task.wait(10) 
for i = 0,1,0.1 do
	script.Parent.Transparency = i
	wait(0.02)
end
task.wait(10)
UserInputService.MouseIconEnabled = true
for i = 0,1,0.1 do
	script.Parent.Transparency = i
	wait(0.02)
end
script.Parent.Visible = false
script.Parent.LoadingText.Visible = false
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, true)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)

i think it waits 20 seconds [char limit yay]

This appears to still remain finite and isn’t working to its properties.

local UserInputService = game:GetService("UserInputService")

-- LoadingGui Script
UserInputService.MouseIconEnabled = false

game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false)

for i = 0,1,0.1 do
	script.Parent.Transparency = i
	wait(0.02)
end

task.wait(10)

for i = 0,1,0.1 do
	script.Parent.Transparency = -i
	wait(0.02)
end

script.Parent.Visible = false
script.Parent.LoadingText.Visible = false

game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, true)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)

UserInputService.MouseIconEnabled = true

would it be possible If I would to send you the system so you can test it