AceKiron
(Ace)
January 4, 2021, 11:48am
#1
I want to fix this bug. The game can still be played with this bug, but it decreases the amount of randomness the game has as well as making some levels harder.
The issue is some parts appearing black.
I have tried asking another player, diamond_julien, if they have the same issue, but they don’t. So I suppose it’s an issue on my end.
Note: ReShade doesn’t have anything to do with it, I tested it on my dad’s computer, without ReShade, and I got the same issue.
Every 25 stages the material of the stage changes to increase randomness, the material is completely random besides a few exclusions:
Enum.Material.Air,
Enum.Material.CorrodedMetal,
Enum.Material.CrackedLava,
Enum.Material.Foil,
Enum.Material.ForceField,
Enum.Material.Glass,
Enum.Material.Neon,
Enum.Material.Plastic,
Enum.Material.SmoothPlastic,
Enum.Material.Water
And here’s a link to my game: Infinite Obby - Roblox
WingItMan
(WingItMan)
January 4, 2021, 12:02pm
#2
Is the colour set to be random aswell?
If you’re using
Part.BrickColor = BrickColor.Random()
… Then you will eventually get the random black colour.
The colour may also turn black if you’re setting the colour via RGB, and the RGB values are outside the colour range.
In this case you may want to use the ‘fromRGB’ method of the color3 class.
In general though we need more information on your setup to help out.
1 Like
AceKiron
(Ace)
January 4, 2021, 12:03pm
#3
I’m using
Part.Color = Color3.fromRGB(math.random(255), math.random(255), math.random(255))
1 Like
WingItMan
(WingItMan)
January 4, 2021, 12:05pm
#4
There you go.
You need to use fromRGB.
Color3.new can only accept values between 0 and 1 (percentage), whereas fromRGB accepts the 255 range.
Swap ‘new’ for fromRGB or whatever the function is called.
1 Like
AceKiron
(Ace)
January 4, 2021, 12:06pm
#5
Sorry, that was my bad, I meant to say fromRGB. In my code I’m actually using fromRGB, I just edited this in my previous reply.
WingItMan
(WingItMan)
January 4, 2021, 12:11pm
#6
Huh, okay.
Can you split the code(create a variable for the colour 3 random value) then and print out what the RGB is before setting it.
If the value is still setting to black, try adding a minimum value to the math.random function, perhaps
math random(100,255)
Instead?
AceKiron
(Ace)
January 4, 2021, 12:21pm
#7
It’s printing values between 0 and 1, which I suppose is intended because it even says that for parts that do have a normal color.
I added a minimum value of 50 but it’s still happening, I also found out it only stays black for a few seconds.
WingItMan
(WingItMan)
January 4, 2021, 1:49pm
#8
Just tried playing the game myself, got to the balls section and they had colour.
(Ignore the blue line, my VR headset was still connected)
Do you and your dad both use Apple devices, could be an issue there.
I was using a Windows 10 desktop.
AceKiron
(Ace)
January 4, 2021, 2:08pm
#9
Me and my dad are both using Windows 10
AceKiron
(Ace)
January 4, 2021, 2:15pm
#10
I’m debugging my game right now, and the parts appear to stay black on some specific materials, here’s a list of materials this bug seems to occur on:
Sandstone
Asphalt
Rock
Salt (here it toggles between colored and black every so often)
Limestone(here it also toggles between colored and black every so often)
Those materials are not valid part materials, those are terrain materials. Try adding those to your material blacklist and see if that solves the problem.
BananDev
(Banan)
January 4, 2021, 2:31pm
#12
Hey!
I have found out that this happens only when I put my graphics to the lowest setting. I think it will be some lighting issue. Using another lightning technology should solve your issue!
EDIT: You might want to make also a topic in #platform-feedback:engine-bugs so Roblox can review this.
AceKiron
(Ace)
January 4, 2021, 2:32pm
#13
I’ll change the technology then!
I would suggest using a different way of generating a random color.
Try: Color3:fromHSV( math.random(), 1, 1) --(adjust the last two numbers for saturation and value)
AceKiron
(Ace)
January 4, 2021, 2:42pm
#15
Why use fromHSV and not fromRGB? does it look better?
Could you provide your code for randomizing the color so the we can see it there is anything that could be causing this problem.
AceKiron
(Ace)
January 4, 2021, 2:54pm
#17
Please read this reply I made:
BananDev
(Banan)
January 4, 2021, 2:54pm
#18
After thinking about your problem I wasn’t able to find any soloution for this. I think it’s some issue with lightning as the obby might be way too far from origin causing it to glitch. I would try moving the obby closer to the origin, but that’s the last thing that I would try. I also suggest you reffering to #platform-feedback:engine-bugs .
1 Like
AceKiron
(Ace)
January 4, 2021, 2:55pm
#19
Thank you, this seems to fix my issue.
Well math.random needs two parameters, the minimum and the maximum. Maybe try:
Color3.fromRGB(math.random(1,255), math.random(1,255), math.random(1,255))