I Am Making A Color Wheel And I Dont Know How To Get Color From Position Of The Cursor
Thanks
I Am Making A Color Wheel And I Dont Know How To Get Color From Position Of The Cursor
Thanks
make this a local script if you're using a gui it won't work
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local mouse = player:GetMouse()
-- Check that there exists a part at which the mouse is pointing
if mouse.Target then
print(mouse.Target.Parent.BrickColor) -- the part's brick color
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
-1 for bad code, mouse.Target already refers to the BasePart and therefore you can literally print mouse.Target.Parent to find what the parent is
Okay! Thank you.