I’m really stuck right now and I need to know how can a part, possibly a part with emitters, be cloned to a GUI’s frame??
To put a part in a GUI, you could use viewportframes: ViewportFrame GUI
(I’m not sure if you can see the particles there)
And if you need to put particles in GUI this could be very helpful rParticle: The Light Weight, Open Source, GUI Particle System
I will try the Viewport and see if the particles would appear from the part. I also checked out that forum already, it doesn’t quite have what I want but thx!
Viewpoints didn’t work or I feel like I am doing something wrong because the part is not cloning to the frame.
Hi, you have to add a Camera into viewportframe and make sure the viewportframe current camera is equal to camera and make sure the current position of it is UDim2.new(0,0,0,0)
One last thing, I recommend to use this module it makes the item rotate and gives it a Very cool effect + you won’t have to do the things above Check it out here.
Particle emitters are unfortunately not rendered inside of ‘ViewportFrame’ instances.
So do I have to create an instance inside of the Frame?
Just create the camera and make it look at that part and position it correctly and set viewport.CurrentCamera to that camera
I’m going to try this now and see what happens!
Btw some tips
- Set the camera.CFrame to the part CFrame and then move it a bit
- Use CFrame.lookAt() to make it look at the part
I am cloning the part to the Viewport, so shouldn’t I set the part’s CFrame relative to the camera’s CFrame??
You’ll need to come up with your own custom particles system.
You have to do the CFrame of it.
Also Check it out here . this particle module it will help you
No no, set the parts POSITION to 0 , 0 , 0 and same with the camera but add a small diff 0 , 4 , 0 or something like that, should be CFrame for the camera tho!
Idk if the particles will appear tho, if not, at least you learned something new!
I’ll test it out and see what I could do.
The part is not being cloned, I don’t know if the camera’s even being made. Here’s the local script:
local player = game.Players.LocalPlayer
local MainGUI = player.PlayerGui:WaitForChild("MainParticlesGUI")
local MainFrame = MainGUI.MainFrame
local ReplicatedStroage = game:GetService("ReplicatedStorage")
local ConfettiCode = script.Parent
local ViewportFrame = ConfettiCode.ViewportFrame1
local ViewportCamera = Instance.new("Camera")
local StarFetti = ReplicatedStroage:WaitForChild("StarFetti")
if ViewportFrame:IsA("ViewportFrame") then
if ViewportFrame ~= nil then
local FettiClone = StarFetti:Clone()
task.wait(3)
if FettiClone ~= nil then
FettiClone.Parent = ViewportFrame
ViewportFrame.CurrentCamera = ViewportCamera
ViewportCamera.Parent = ViewportFrame
ViewportCamera.CFrame = CFrame.lookAt(FettiClone.Position + Vector3.new(0, 4, 0), FettiClone.Position)
print("Cloned")
end
end
end
You made the look at, the positions are still wrong tho…
Try this instead
viewportCamera.CFrame = CFrame.new(Vector3.new(0, 2, 12), FettiClone.Position)
No luck, guess I got to make my custom particles.
So weird how you can’t clone a part to a GUI but can’t do nothing about it.