So I'm making an old computer game and I'm trying to make it so it changes the icon when you hover over it and drag it.


--LOCAL SCRIPT--

frame = script.Parent
frame.Draggable = true
frame.Active = true
frame.Selectable = true
local button = script.Parent.Close
local mouse = game.Players.LocalPlayer:GetMouse()

button.MouseButton1Click:Connect(function()
	frame.Visible = false
end)

frame.MouseEnter:Connect(function()
	mouse.Icon = 'rbxassetid://4659826010'
end)

frame.MouseLeave:Connect(function()
	mouse.Icon = 'rbxassetid://4659826010'
end)

frame.MouseMoved:Connect(function()
	mouse.Icon = 'rbxassetid://4659826010'
end)

2 comments

0

It should work, make sure to make the Icons different, they are all the same assetId currently.

0

yeah I want it to be the same icon