What do you want to achieve? I want to make a script that a function happens not just to one but to mulitple parts!
What is the issue? The issue is that I don’t know how to make a make a short version of the script…
What solutions have you tried so far? I have looked in the topics in DevForum, but I couldn’t find what I wanted!
I’m making a DC Obby. There is a folder called “Checkpoints” and the parts are named by numbers. I want to make some parts do something and some other parts do something else. Sorry if I’m not making any sense .
You would use a for loop for this purpose and iterate through an Array of children with GetChildren, like this:
for i,v in Instance:GetChildren() do -- iterates through all children within an Item
if v:IsA("BasePart") then -- if The Instance is a Part
-- Apply Touch event
end
-- Apply The Touched Event for all BaseParts
end
Hi!
Sorry if I understood you incorrectly, but I believe you want something alike this example:
I have a folder with parts named part1 to part 10. I want the parts 1-4 to be destroyed, the parts 5-7 to go up a stud, and the parts 8-10 to become half transparent.
You can simply select and edit them like this:
local folder = workspace.Folder
local function change()
for i = 1,4 do
folder["part"..i]:Destroy()
end
for i = 5,7 do
folder["part"..i].Position += Vector3.new(0,1,0)
end
for i = 8,10 do
folder["part"..i].Transparency = 0.5
end
end
change()
I’m making a script for a textlabel, so do I put the script inside of the textlabel (I want to make players have their own ui if you know what I mean)?
It really doesn’t matter where you place it, as long as it is in the same ScreenGui. I usually just place it in the TextLabel to keep it clean. What do you want the script to do with the TextLabel if I may ask? That way i can edit the script for you if you’d like.
I want the textlabel to change color and by the way, the DC stands for Difficulty Chart if you didn’t know . But you don’t need to make the script, I can do it by myself!
Oh I didn’t know indeed, that’s a very fun project! I wish you luck with your project. Do you mind sending me the name of the game so I can check it out some time?
The game is still not out at the moment, but it will be out this week for sure! And you’ll be the first to try out the game . (If you want, I can send some screenshots!)
That looks amazing!
I’d give it a 4.5/5 because the game really looks fantastic, but the gui colors are a little dull to me. I think that if you’d change the gui color based on the player’s level, it would be a 5/5 to me. (If you do this, make it a little bit lighter or darker as seeing the same color everywhere might be confusing to the player.)
The colors are well chosen, they really fit into the type of game. There are also alot of gui options, which is great! The game looks like I could see it in between other popular DC’s. The images put in the gui are also smooth, and fit very well!