How would I go on about making particles go on a player’s screen? I tried viewport frame, but it didn’t work. How do I make it look like this image below?
Uh, I’m not sure, because I never played that, but I think that’s a animated Image Frame.
It works like regular particles, on lower graphics it doesnt glow, on higher graphics it glows and has more amounts on screen. (sorry i dont have a lower graphics image, the game removed it a while back)
ParticleEmitters inside a ViewportFrame.
I tried, but it didnt work. Viewport frames don’t render particles
You’re right, I just tried with a WorldModel instance too (which allows for physics inside of viewport frames) but that didn’t work either.
well if i were to make that kind of effect, i personally would make a part and put attachment on the edges, and put the particles inside it
example:
after that i just set the part’s CFrame to the camera CFrame and this is the result
How would I go on doing that in scripting? that sounds like a brilliant idea actually
I’ve also decided to make a module version of it, you can get it here
--Example Script:
local CamOverlay = require(game.ReplicatedStorage.CameraOverlay)
local Hash = CamOverlay:Start(game.ReplicatedStorage.Burn)
task.wait(2)
CamOverlay:Remove()
--Example Script 2:
local CamOverlay = require(game.ReplicatedStorage.CameraOverlay)
CamOverlay:Start(game.ReplicatedStorage.Burn, 2)
-- this module was very old, i have updated it to make it alot more accessible and accurate.
make sure you have sized the particle so it doesn’t cover the whole screen
Ok Thanks. This is very useful!
The effect’s resolution appears to have been reduced (due to its upscaling to fit the camera’s viewport), consider making the size of the BasePart instance match that of the camera’s viewport size such that the aspect ratio of the BasePart matches that of the camera’s viewport.
I’m pretty sure i’ve already fixed that in the module
i have 2 problems, so it doesnt appear to be the right resolution for smaller res and it takes a slight moment for the thing to follow your cam position, anyway to fix this?
You should start a new thread with the module’s code which handles the effect.
Ok, i’ll try to find help. Thanks for suggesting
for the camera delay bug It’s probably because you are using the script serversided
the size bug is probably because i didn’t set the part size scales to the camera viewportsize
i will try my best to make the part scale with the camera
Ok, i’ll be waiting for it. Also I put the script in local script
Ok, so from doing some basic division math out of the blue. I figured that the box’s X size should be Workspace.Camera.ViewportSize.X.Value/257. While the Y value should be Workspace.Camera.ViewportSize.Y.Value/226.71
if we’re using the raw ViewportSize value the part size would be too big, so to scale it like normal part size we can use ViewportSize.Unit
wait, but the /257 and /226.71 is kinda working. and how do we use the ViewportSize.Unit thing?