I think some of the code can be improved or fixed. Here’s what I found:
Line 26 should not have a wait() or any delay, especially on the server. That just causes lag and is unnecessary.
On line 42, the server script will clone the DepthOfField script to StarterPlayerScripts, but that script has a local character = player.Character or player.CharacterAdded:Wait(), which is a terrible design. The reason why it’s a terrible design is because it won’t assign a new character when it dies.
Inside “ReflectParts”, it does not connect Workspace.DescendantAdded. This is problematic when streaming is enabled.
In addition, the whole thing doesn’t seem like there’s much to it. The results are surprising for something like this, though. I don’t think it’s that good for performance if the PBR textures lag you.
Again, trying not to sound rude but, just so no one gets mislead, this (seems to) only looks as good as it does because cubemap images are generated indoors by Roblox (basically, reflections) due to a recent update. Unless your game is fully indoors and every texture is PBR, it wont look anything like this, and will reflect the skybox. This can all be done without this resource.
Y’know, something interesting or impressive. Actual raytracing, a lighting engine, something that has never been done before on Roblox.
Fair enough, you’re right. I know this might sound like a crazy dumb idea but what if I made some sort of fake sky to be able to reflect the interior too?
ipairs only stops yielding if it reaches nil, which isn’t even possible when using instance:GetChildren() and you don’t need to use pairs nor ipairs anymore because of the iteration for i, v in instance:GetChildren() do
if v == true then is 100% equal to if v then
You’re supposed to be using character:FindFirstChildOfClass() instead of character:FindFirstChild() for the clothes
Is it just me or it doesn’t seem to do anything? I might be doing this incorrectly so correct me if I’m mistaken. I do notice the materials look slightly shinier but I don’t see any changes in reflections.
Also, I replied to you by mistake. Sorry about that.
If you guys want Ray Tracing without quotation marks and that doesn’t make everything look wet, here is a resource that might help: TPGI RE4 - Faster Realtime GI!
It might not be the cheapest but does the job pretty well. It does exactly what Ray Tracing does, adds Global Illumination, where light bounces of objects and illuminates other objects.
Hey, that’s because my account was terminated, the model should now be availible since it is no longer deleted. However - it is not that great and there are some other interesting resources like @BubasGaming mentioned: