|
Guest422349 (Guest 422349) August 24, 2023, 6:36pm 1
Hello! I am trying to make a custom cursor for my game, however I need to make it change to different cursors when I hover over things. Like text boxes or buttons. Current Script: local userInputService = game:GetService("UserInputService") local starterGui = game:GetService("StarterGui") local cursorGui = script.Parent:WaitForChild("Cursor") local cursorImage = cursorGui.Cursor userInputService.MouseIconEnabled = false starterGui:SetCoreGuiEnabled("All", false) local normalCursor = "rbxassetid://7025168168" local hoverCursor = "rbxassetid://7025167191" local textCursor = "rbxassetid://79572790" while wait() do if userInputService.KeyboardEnabled then script.Parent.Cursor.Enabled = true local mouseLocation = userInputService:GetMouseLocation() cursorImage.Position = UDim2.fromOffset(mouseLocation.X, mouseLocation.Y) else script.Parent.Cursor.Enabled = false end end (责任编辑:) |
