I already have this script, but it doesn’t work
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local cursorGui = script.Parent
-- Hide default cursor
mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
-- Update cursor position
mouse.Move:Connect(function()
cursorGui.ImageLabel.Position = UDim2.new(0, mouse.X, 0, mouse.Y)
end)
-- Show custom cursor
cursorGui.ImageLabel.Visible = true
-- Hide custom click detector cursor initially
cursorGui.CustomClickDetectorCursor.Visible = false
-- Show custom click detector cursor on mouse click
mouse.Button1Down:Connect(function()
cursorGui.ImageLabel.Visible = false
cursorGui.CustomClickDetectorCursor.Visible = true
end)
-- Hide custom click detector cursor on mouse release
mouse.Button1Up:Connect(function()
cursorGui.ImageLabel.Visible = true
cursorGui.CustomClickDetectorCursor.Visible = false
end)
Does anyone know what I can do to fix this?