I think it’s a bug, Ive only recently encountered this issue, maybe I’m missing something idk, even that prints as Color3.new 1,1,1
What used to be white in my script without changing anything is now black, the reason I found out about this
I think it’s a bug, Ive only recently encountered this issue, maybe I’m missing something idk, even that prints as Color3.new 1,1,1
What used to be white in my script without changing anything is now black, the reason I found out about this
I’m sure that’s just a feature you can use to show an RGB colour inside your script rather than something that looks like this…
214612874,24124214124,124124
(example)
it still works the same way, it just looks different in your script.
Love the game btw!
I’m not too sure then, to me it looks like a feature put there on purpose however if it’s not functioning the way it’s supposed to. Therefore, I’d recommend a bug report.
Thanks for being a player!
Yeah I’m unsure if it’s a bug or not that’s why I posted it here.
No problem, hope I was able to assist in some sort of way!
It seems to be intended behavior for Color3.fromRGB
to return a Color3
.
From what I understand, its purpose is to make a Color3
FROM an RGB value.
What are you trying to do exactly?
Set the color of the descendants’ particles or anything that has a color property
and why are u pcalling??? pcalling is for networking, you have no reason to pcall here, you are just avoiding errors that might be your issue
As you can see it’s the first thing that gets executed so no it’s not the pcall’s fault. I’m pcalling for code readability, it outweights the extra performance cost imo
It sounds like you don’t know what pcall even is.
Just cause Color assignment is executed first inside a pcall doesn’t mean it can’t be it’s fault.
I’m pcalling for code readability
That’s one of the foolish things I’ve ever heard someone say.
Remove the goddamn pcall
Pcall is a protected call, code inside it doesn’t throw an error if it does and stops execution inside the pcall. That’s what it does. The first line which is the set color line will always execute for all descendants (will throw an error if they dont have a color property which is already expected). Explain how it’s foolish to use pcall for readability in that situation instead of using a ton of IsA making the code at least twice as long?
Printing any color3 value always returns a percentage value from 0 to 1.
If you want to print it in RGB format then multiply the individual components by 255 and round them.
Yeah it’s not a bug just something off with this specific situation which I mentioned
pcall is meant for error handling and not controlling program flow in a predictable manner
pcall hides the real problem by suppressing the errors, which means if error occurs (such as trying to set a property) it fails silently, doesn’t matter if its the first instruction of the pcall’s body. if it fails. it fails.
pcall is designed for situations where an unpredictable runtime error might occur (eg. HTTP requests, external calls. Using it to avoid explicit type checking is an abuse of its intended purpose.
and your “performance” issue, pcall is less performant than an IsA cause of it’s error handling mechanism.
but sure, if all you’ve learned in your whole life is bad practice, then go ahead, whine about your problem and use everything how its not intended to be used
I know what’s a pcall my guy, I’m using it in this case because it works best for me not because I think it’s generally good practice. “Whine about your problem” LOL, yeah you know it’d help if you actually said something relevant to the problem if you’re going to comment about it
I know what’s a pcall my guy
clearly you don’t, if you knew you would use it for it’s intended purpose
That’s not very nice. Sure, the pcall
is bad practice in this case, but you don’t need to be so demeaning.
Just giving my 2c and agreeing it is bad practice in this case, because you aren’t even checking whether it succeeds, you are just hiding any runtime errors that occur and adding unnecessary noise to your code.
There would literally be no difference in the behavior of you code if you removed the pcall
statement, it would just be shorted and easier to read.