Cloning A Part To A GUI

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!

1 Like

Btw some tips

  1. Set the camera.CFrame to the part CFrame and then move it a bit
  2. Use CFrame.lookAt() to make it look at the part
2 Likes

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

1 Like

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.

1 Like

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…

1 Like

Try this instead

viewportCamera.CFrame = CFrame.new(Vector3.new(0, 2, 12), FettiClone.Position)
2 Likes

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.

You can’t do particles in viewportframe But there is a module that makes particle on the gui.

Here it is

1 Like

I’ve been trying to use that all along but it’s frustrating.

You can, you never made it correctly (sorry i was gone ;-; )

Camera.CFrame = part.CFrame * CFrame.new(0 , 4 , 0) --feel free to change the numbers
Camera.CFrame = CFrame.LookAt(part.position , part.position)
1 Like

I managed to make my own custom particles but thanks man! Also, I need help with something.

nice, fell free to ask anything you want!

1 Like

I am trying to add a kind of delay to the frames that I have in a table. Basically, I have 3 frames inside of one whole frame and I did a for loop in order to access these frames but I want to make a kind of delay between them so like for instance, Frame 1 is found in the table and particles shoot out of that but there is a .5 second delay before particles shoot out in Frame 2 and so on.

1 Like

Basically something like switches, so I clone a script to the the three frames but I want the cloned script parented to Frame 2 to activate a little later than the cloned script parented to Frame 1.

1 Like