How do I add auras to a model in a viewport frame?

I want to make an aura collection like sols rng and I got to the part where i would need to click the button to then add the aura to the viewport model and it seems it just doesnt show up.

Here is my code currently (the aura will be picked out in the code later)

local AurasFound = {
	[1] = "Gomu",
	[2] = "Sandstorm",
	[3] = "Santoryu",	
	[4] = "Diablo",
	[5] = "Prince",
	[6] = "Saiyan",
	[7] = "Rasen",
	[8] = "Chidori",
	[9] = "Kaiju",
	[10] = "Lotus",
	[11] = "Jetsteam",
	[12] = "Esper",
	[13] = "Hunter",
	[14] = "Shadow",
	[15] = "King",
	[16] = "Eminence",
	[17] = "Joyboy",
	[18] = "Infernal",
	[19] = "AntiMatter",
	[20] = "Limitless",
}

for _,Aura in AurasFound do
	local UnlockedTemplate = CollectionsMain.ScrollingFrame.Unlocked:Clone()
	UnlockedTemplate.Parent = CollectionsMain.ScrollingFrame
	UnlockedTemplate.Main.Text = Aura
	
	UnlockedTemplate.TextButton.MouseButton1Down:Connect(function()
		local ParticleEmitter = Instance.new("ParticleEmitter")
		ParticleEmitter.Parent = CollectionsCanvas.Container.ViewportFrame.Rig.PrimaryPart
		ParticleEmitter.LockedToPart = true
	end)
end

task.wait()

CollectionsMain.ScrollingFrame.Unlocked:Destroy()
CollectionsMain.ScrollingFrame.Locked:Destroy()
local Viewport = CollectionsCanvas.Container.ViewportFrame
local Camera = Instance.new("Camera",Viewport)

Camera.CFrame = Viewport.Rig.PrimaryPart.CFrame * CFrame.new(.9,-2,5)
Camera.CFrame = CFrame.lookAt(Viewport.Rig.PrimaryPart.Position,Viewport.Rig.PrimaryPart.Position)
Viewport.Rig.PrimaryPart.Orientation *= Vector3.new(0,0,180)
Viewport.CurrentCamera = Camera

why doesnt it work currently and will i have to use another method to display the model with the aura?

1 Like

if its a particle/trail/beam, then i don’t believe that will show up in viewport frames

Your best bet is to just apply the auras to a rig in workspace and make the camera show that rig in a room when you open the UI, since ViewportFrames don’t render ParticleEmitters, Trails, Beams, and other effects you may have in your auras.

i just tried doing that and the camera wont change for some reason.
here’s my code:

CollectionsButton.MouseButton1Click:Connect(function()
	local Camera = Instance.new("Camera")
	Camera.Parent = workspace
	Camera.Name = "temp"
	Camera.CameraType = Enum.CameraType.Scriptable
	Camera.CFrame = workspace:WaitForChild("Platform").Rig * CFrame.new(0,0,5)
	if workspace.CurrentCamera == workspace.Camera then
		workspace.CurrentCamera = Camera
	elseif workspace.CurrentCamera == Camera then
		workspace.CurrentCamera = workspace.Camera
	end
end)

particle emitter doesnt render in viewportframe, what you can do is doing a cutscene showing up the character with the aura

its impossible.

Not the viewport’s camera. What I mean is you use the workspace’s CurrentCamera property and change it’s CFrame to show the rig or CameraSubject to the head of the rig you want to place auras on.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.