Making particles transparency 1 through clicking a part

Those are the only properties a model has, there is no “Gender” property on any object in roblox that I know of

1 Like

There is no “gender” property on models and well every instance there is, you may be thinking of the parent. Right now it seems the parent is workspace.

Regardless if this was a joke or not, the amount of joke replies took this a bit too far. 10 people didn’t have to post a joke about OPs mistake. This is the devforum, be civilised.

8 Likes

I realised my mistake now, kinda sad to see how many people didn’t help… Greatful for the ones who did…
Try and read my rewrite… it was what I was trying to get across

Make a Part.
Put a ClickDetector inside the part.
Put the particle emitter you want inside that part.
Put a script and put this inside the script:

script.Parent.ClickDetector.MouseClick:Connect(function()
script.Parent.ParticleEmitter.Transparency=NumberSequence.new(1)
end)

Must use a NumberSequence or it won’t work

2 Likes

Hey, can you provide some more context on to what you are doing? It seems like you are trying to make a button be pressed to change your particles. It seems you’re new and can use some help, I would highly recommend using @Egzekiel 's solution.

Just for some clarification: You should find the path by using the “explorer” tab and look within the Workspace folder, then find the direct path to the part you need for your particles.

1 Like

Unless you have this, your code is definitely not going to work
image

5 Likes

script.Parent would get the parent of the part. script.Parent.Parent would be used instead of script.Parents.Father.Mother. To get a direct child of an object, you’d do Object.ChildName; for example, script.Parent.Parent.Parent.Model1.ParticlePart.ParticleEmitter

1 Like

But I need part A once clicked change the particles transparency to 1 in part B

From what I see this happens in the Part with the particle, in my case B

Do you mind posting a screenshot of your hierarchy so we can further understand what’s parented to what?

1 Like

Rip, I don’t plan to be districted to this code though. If it’s not going to work or not correct I’m open to a different script or corrections, I think I need a different script lol

It would be best if you try to understand what you wanna do, I suggest you go to this page and start learning so you don’t have to ask to do that kind of stuff for you.

http://wiki.roblox.com/index.php?title=Intro_to_Scripting

If you have another question related to developing, feel free to make a new thread ^^

2 Likes

I seem to have found your issue, you are not connecting the “clicked()” function to a .MouseClick event and there seems to be no ClickDetector, if no one has replied a working fix yet then you can use this. :slight_smile:

local Part = script.Parents.Father.Mother.Sister.SistersPart
local Particle = Part.PartParticles.Particles
local ClickDetector = Instance.new("ClickDetector")

function clicked()
	Particle.Transparency = NumberSequence.new(1)
end

ClickDetector.Parent = Part
ClickDetector.MouseClick:Connect(clicked)

image Directory should look like this if i’m correct.
Here is a GIF (Graphics Interchange Format) of what will happen when you click the part.
https://i.gyazo.com/1458fd70c2af1d00c457d3204262648d.mp4

3 Likes

Yay, thank you so much. Since the script I used originally included that odd directory, couldn’t I change it to script.parents.(partname)

If you want to make it simpler you could move the script in ServerScriptService and have the part just be in workspace with particles inside the part.
Here is what the code would look like and how the directory would look, this has the same effect as my above GIF shows.

local Part = workspace.ThePart
local Particle = Part.PartParticles.Particles
local ClickDetector = Instance.new("ClickDetector")

function clicked()
	Particle.Transparency = NumberSequence.new(1)
end

ClickDetector.Parent = Part
ClickDetector.MouseClick:Connect(clicked)

image This is what the directory would look like this time, this is much cleaner.

2 Likes

Okay I’ll try it when’s I get to my computer, thank you so much. You’ve been the most helpful so far :slight_smile:

Thank you to everyone who replied on topic and to those who were genuinely willing to help the user out. The main goal of this new category is to create any questions you might have without the fear of being wrong. There is never a wrong answer and we would appreciate if the responses took a positive direction in the future.

Below is some feedback of how we can improve in the future. Props to those who did!

Encourage the Developer to use the correct format
Understand the Developer issue posted
If there are any issues on the thread you can kindly provide feedback to the Developer with a positive response

What we did not do well
Let’s not make someone feel less for not knowing something. The point of these threads is to provide feedback and never to judge someone for being wrong. This goes on both ways the OP and those who respond to the thread.

I will be removing the responses that were not meaningful. Please read this feedback message when you can.

Thanks,
Developer Relations Team

21 Likes

Please mark the person’s answer as the “solution” if it worked, by clicking the checkbox next to the like button. This would help future developers with this question to be able to find the answer, without having to test out all people’s theories and spending lots of time. Thanks you.

5 Likes