织梦CMS - 轻松建站从此开始!

欧博ABG官网-欧博官方网址-会员登入

欧博abgCustom Mouse Cursor

时间:2026-01-22 09:30来源: 作者:admin 点击: 11 次
Hello, in the project I’m working on I need a dot as the mouse cursor (the project will be in first-person). I’ve tried multiple solutions, but none w

Okay it seems to be a studio bug because it works perfectly on roblox.
Btw I’m using a different code that I found somewhere, here it is if anyone needs it:

local UIS = game:GetService("UserInputService") local GuiService = game:GetService("GuiService") local Players = game:GetService("Players") local RunService = game:GetService("RunService") local plrGui = Players.LocalPlayer:WaitForChild("PlayerGui") local guiInset = GuiService:GetGuiInset() local icon = script.Parent:WaitForChild("Cursor") local MouseIcons = {"rbxassetid://14691803466","rbxassetid://14691803466","rbxassetid://12323391502"} --Rest, Hover, Typing RunService.RenderStepped:Connect(function(dt) UIS.MouseIconEnabled = false local mousePos = UIS:GetMouseLocation() - guiInset icon.Position = UDim2.fromOffset(mousePos.X,mousePos.Y) local uiObjects = plrGui:GetGuiObjectsAtPosition(mousePos.X,mousePos.Y) local iN = 1 local z = -1000 for _,obj:GuiObject in ipairs(uiObjects) do if obj:IsA("GuiButton") and obj.Active == true then if obj.ZIndex > z then z = obj.ZIndex iN = 2 end elseif obj:IsA("TextBox") and obj.Active == true then if obj.ZIndex > z then z = obj.ZIndex iN = 3 end end end icon.Image = MouseIcons[iN] end)

Thanks for your help!

(责任编辑:)
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:
发布者资料
查看详细资料 发送留言 加为好友 用户等级: 注册时间:2026-01-28 11:01 最后登录:2026-01-28 11:01
栏目列表
推荐内容