I got my blasters and my particle ready but i don’t know how to make the particle come out when my gaster blaster shoots. this is just a model to show what I want it to do. but I don’t know how to make or reference an id in Roblox studio.
and after I made this, I don’t really know what to do after I made it.
the only thing I think I need to know is how to reference an id but still I cant script.
if there is something you dont get please tell me.
What do you mean by “reference an id” ? You mean like an image id?
a particle id. so it can do a specific particle.
Can you elaborate a bit further? And also, can you show us the full script so we can actually tell you what part to put it in?
this is the script.
while true do
local p = Instance.new(“Part”, script.Parent)
p.Name = “ChargingAura”
p.Anchored = true
p.CFrame = script.Parent.BeamCharging.CFrame
p.Shape = Enum.PartType.Ball
p.Size = Vector3.new(script.Parent.BeamCharging.Size.X * 2.5, script.Parent.BeamCharging.Size.X * 2.5, script.Parent.BeamCharging.Size.X * 2.5)
p.Material = Enum.Material.Neon
p.Transparency = 1
p.CanCollide = false
script.Parent.Beamer.Charge:Play()
for i = 1,20 do
p.Size = p.Size - Vector3.new(script.Parent.BeamCharging.Size.X * 0.075, script.Parent.BeamCharging.Size.X * 0.075, script.Parent.BeamCharging.Size.X * 0.075)
p.Transparency = p.Transparency - 0.0375
script.Parent.Jaws.CFrame = script.Parent.Jaws.CFrame * CFrame.Angles(math.rad(2.25), math.rad(0), math.rad(0))
wait(0.025)
end
game.Debris:AddItem(p, 0.5)
wait(0.5)
local c = Instance.new(“Part”, script.Parent)
local e = Instance.new (“SpecialMesh”)
local s = Instance.new(“ParticleEmitter”)
s.Parent = c
s.Rate = 0
e.MeshType = Enum.MeshType.Sphere
e.Parent = c
c.Name = “GasterBeam”
c.Color = BrickColor.new(“Gold”).Color
c.Anchored = true
c.Shape = Enum.PartType.Cylinder
c.Size = Vector3.new(0, script.Parent.BeamCharging.Size.Y * 7, script.Parent.BeamCharging.Size.Z * 7)
c.Material = Enum.Material.Neon
c.Transparency = 0
c.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild(“Humanoid”) then
hit.Parent:FindFirstChild(“Humanoid”):TakeDamage(script.Parent.Damage.Value)
end
end)
script.Parent[“Right Eye”].Transparency = 1
script.Parent.Beamer.Shoot:Play()
s.Rate = 100
for i = 1,10 do
c.Size = c.Size + Vector3.new(script.Parent.BeamCharging.Size.X * 10, script.Parent.BeamCharging.Size.Y / 10, script.Parent.BeamCharging.Size.Z / 10)
c.Transparency = c.Transparency + 0.025
c.CFrame = script.Parent.BeamCharging.CFrame + script.Parent.BeamCharging.CFrame.RightVector * ((c.Size.X / 2) + (script.Parent.BeamCharging.Size.X * 1.5))
c.CanCollide = false
wait(0.00001)
end
for i = 1 , 2 do
for i = 1,10 do
c.Size = c.Size - Vector3.new(-(script.Parent.BeamCharging.Size.X * 2), script.Parent.BeamCharging.Size.Y / 20, script.Parent.BeamCharging.Size.Z / 20)
c.CFrame = script.Parent.BeamCharging.CFrame + script.Parent.BeamCharging.CFrame.RightVector * ((c.Size.X / 2) + (script.Parent.BeamCharging.Size.X * 1.5))
c.Transparency = c.Transparency - 0.025
wait(0.025)
end
for i = 1,10 do
c.Size = c.Size + Vector3.new(script.Parent.BeamCharging.Size.X * 2, script.Parent.BeamCharging.Size.Y / 10, script.Parent.BeamCharging.Size.Z / 10)
c.CFrame = script.Parent.BeamCharging.CFrame + script.Parent.BeamCharging.CFrame.RightVector * ((c.Size.X / 2) + (script.Parent.BeamCharging.Size.X * 1.5))
c.Transparency = c.Transparency + 0.025
wait(0.00001)
end
wait()
end
for i = 1,10 do
c.Size = c.Size - Vector3.new(-(script.Parent.BeamCharging.Size.X * 2), script.Parent.BeamCharging.Size.Y / 4, script.Parent.BeamCharging.Size.Z / 4)
c.CFrame = script.Parent.BeamCharging.CFrame + script.Parent.BeamCharging.CFrame.RightVector * ((c.Size.X / 2) + (script.Parent.BeamCharging.Size.X * 1.5))
c.Transparency = c.Transparency - 0.025
wait(0.00001)
s.Rate = 0
end
game.Debris:AddItem(c, 0)
script.Parent["Right Eye"].Transparency = 0
for i = 1,20 do
script.Parent.Jaws.CFrame = script.Parent.Jaws.CFrame * CFrame.Angles(math.rad(-2.25), math.rad(0), math.rad(0))
wait(0.00001)
end
script.Parent.Beamer.Bling:Play()
wait(0.5)
end
Why did you put 0? Maybe try to make it .5 or 1
let me see. if it works. i dont know what else i am suppose to do.
it didn’t work hugecoolboy. maybei should do something else.
I just noticed that the catalog item is a Model. To set the texture, the id has to be from a decal, not a model. Upload the texture to the library as a decal and copy the id from the url.
For example, this leads to an image. So if you do:
ParticleEmmiter.Texture = "rbxassetid://265790768"
( )
The texture will become the image.
i dont even know ow to make it into texture
Click on the “Create” or “Develop” page on the website:
Then on the left side, you’ll see “My Creations.” Click on “Decal.”
Then upload the image (it’ll take sometime because it has to go through moderation):
After that, click on the asset that was created (this was an asset I made a while back):
And copy the id from the url.
this is the texture id rbxasset://textures/particles/smoke_main.dds in the roblox studio
That’s the default texture for particles emitters
ik. but it just has color sequence.
Ok, copy the color sequence and particle id into your script
i don’t know how. you know what i will just stop.
Click on the ParticleEmitter and go to the Texture
property and copy it.
Then in your script set your ParticleEmitter to the texture:
s.Texture = "texture you copied"
Go back to the ParticleEmitter and go to the Color
property (first press the color image) and click on ...
.
You’ll see this menu pop up:
Click on the Keyframes and click on the color near the bottom and you’ll see this:
Copy down the Red
Green
and Blue
properties.
Go back to your script a create a table for the ColorSequence
.
s.Color = ColorSequence.new {}
Create a ColorSequenceKeypoint
in the table.
And it’s parameters are:
ColorSequenceKeypoint.new(int time, color Color3)
The time
is where the color appears in the ColorSequence:
The color
is the Color3
to apply.
The red, green, and blue numbers that were copied down (or memorized) earlier is where you place them: Color3.fromRGB(40, 67, 123)
(example).
-- example finished
s.Color = ColorSequence.new {
ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 0, 0),
ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 255, 255)
}
Do this process repeatedly until you have all the colors.
https://developer.roblox.com/en-us/api-reference/datatype/ColorSequence