So this is the Custom Cursor I have for my game
What I wanna do is whenever you open the ROBLOX pause menu…
The custom cursor would disappear and it would be the regular ROBLOX one
← X | ✓ →
I’m not sure if you heard of the Blur Background for the Pause Menu, but that’s the type of thing I’m looking for just instead of blurring the Custom Cursor the transparency of the it would be gone.
Source Code of the Custom Cursor if it helps (It's inside of a GUI)
-- // Services
-- External services
local userInputService = game:GetService("UserInputService")
local tweenService = game:GetService("TweenService")
local runService = game:GetService("RunService")
-- Internal services
local playersService = game:GetService("Players")
-- // Variables
-- Player variables
local player = playersService.LocalPlayer
local mouse = player:GetMouse()
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:FindFirstChild("Humanoid")
local camera = workspace.CurrentCamera
-- UI variables
local cursorUI = script.Parent
local cursor = cursorUI:WaitForChild("Cursor")
local clicked = cursor:WaitForChild("Clicked")
-- Values
local target = nil
-- // Functions
userInputService.MouseIconEnabled = false
local function tweenCursor(state)
local tween = nil
if state == true then
tween = tweenService:Create(cursor, TweenInfo.new(0.25, Enum.EasingStyle.Quad), {
ImageColor3 = Color3.fromRGB(255, 82, 82),
Size = UDim2.new(0.03, 0, 0.03, 0)
})
elseif state == false then
tween = tweenService:Create(cursor, TweenInfo.new(0.25, Enum.EasingStyle.Quad), {
ImageColor3 = Color3.fromRGB(255, 255, 255),
Size = UDim2.new(0.02, 0, 0.02, 0)
})
end
tween:Play()
spawn(function()
tween.Completed:Wait()
tween:Destroy()
end)
end
local function clickedEvent()
clicked:TweenSize(UDim2.fromScale(1, 1), Enum.EasingDirection.Out, Enum.EasingStyle.Quint, 0.25, true, nil)
local tween = tweenService:Create(clicked, TweenInfo.new(0.25, Enum.EasingStyle.Quad), {BackgroundTransparency = 1})
tween:Play()
spawn(function()
tween.Completed:Wait()
tween:Destroy()
clicked.Size = UDim2.fromScale(0, 0)
clicked.BackgroundTransparency = 0
end)
end
local function updateCursor()
cursor.Position = UDim2.new(0, mouse.X, 0, mouse.Y)
target = mouse.Target
if target ~= nil and target:FindFirstChildOfClass("ClickDetector") then
local click = target:FindFirstChildOfClass("ClickDetector")
if (character.HumanoidRootPart.Position - target.Position).Magnitude < click.MaxActivationDistance then
tweenCursor(true)
else
tweenCursor(false)
end
else
tweenCursor(false)
end
end
-- // Connections
mouse.Button1Down:Connect(function()
if target ~= nil and target:FindFirstChild("ClickDetector") then
print("Clicked click detector")
clickedEvent()
end
end)
runService.RenderStepped:Connect(updateCursor)