Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can i make all clickdetector icons change? (All clickdetectors in workspace)

Hello, is there a way to change all clickdetector icons in workspace? could you help me? I have too many clickdetectors so i can't change them by hand.

1 answer

✓ Accepted answer

This may or may not be laggy depending on how many parts your place has, but GetDescendants is a great way to locate every child within' an array.

local CursorId = "2287179355" -- id of the decal you want the mouse changed to

for _,v in pairs(workspace:GetDescendants()) do
	if v:IsA('ClickDetector') then
		v.CursorIcon = "rbxassetid://"..CursorId
	end
end

2 comments

0

You are awesome works with no lag.

0

Glad to hear.

This discussion is preserved as it was. New answers, comments, and votes are closed.