1.) What do you want to achieve? Keep it simple and clear!
- How do I make the shiftlock icon spin when its enabled?
2.) What is the issue? Include screenshots / videos if possible!
3.) What solutions have you tried so far? Did you look for solutions on the Developer Hub?
- I’ve looked everywhere on the dev forum, youtube, etc… but found nothing
looks like a spinning imagelabel with the shiftlock cursor disabled. ive got no idea how to disable the cursor though
1 Like
Just like the post above, use an imagelabel with the shiftlock disabled and use tween to rotate it. To disable it, you don’t actually need shiftlock. According to the footage, it seems like they locked the mouse using UserInputService:
local CursorUI = [insertcursorinstanceUIhere]
local TweenService = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")
UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
UserInputService.MouseIconEnabled = false
local TweenInfo = TweenInfo.new(
0.1,
Enum.EasingStyle.Linear,
Enum.EasingDirection.InOut,
0,
false,
0
)
while true do
local Tween = TweenService:Create(CursorUI, TweenInfo, {Rotation = CursorUI.Rotation + 1})
Tween:Play()
end
to let you know, this script was made in seconds lol but I hope it is a good reference or a good baseline!
edit: I forgot to include making the image label set its position to the mouse, but use offset, not scale when setting the image label position using UDim2()