I’m making a game that has character customization, and you will select the color of the pupils in RGB. I did a RemoteEvent but it is not working, what is wrong?
I’ve rewritten the code several times based on other scripts but it didn’t work
Also you shouldnt pass the RGB value through the remote because players can fire it and change their pupils
edit : @45Fox54 How about you store the different eye colors on the server in a table like so
local pupilColors = {
Color3.fromRGB(255,0,0)
Color3.fromRGB(0,255,0)
Color3.fromRGB(0,0,255)
}
game.ReplicatedStoarge.RemoteEvent.OnServerEvent:Connect(function(player,liger,color)
for _, colors in ipairs(pupilColors) do
if color == colors then
-- Do stuff
end
end
end