I couldn't explain it very well in the title, so here's a much more specific description. What I want to do is have something like 10 small parts that sprout from the ground, one by one, towards where the player is looking. That, I can do very simply, and it looks a bit like this:
for i = 1,10 do
x = Instance.new("Part", game.Workspace)
x.Anchored = true
x.CanCollide = false
--bla bla bla surfaces and sizes and stuff
x.CFrame = player.Character.Torso.CFrame * CFrame.new(0, 0, -i * 3)
game.Debris:AddItem(x, 3)
wait(.1)
end
So that's the easy part. But what I need is for each part to change colors based on the ground they "sprout" from. So, my problem is that I can set the color to whatever I want, but if, let's say, the first half of them are on a Green Surface and the second half are on a Blue surface, every part will still be green, rather than changing the last half to blue.
It's rather complicated (to me... I could be missing something and it could actually be very easy, I have no idea.), but I've been stuck on this for quite some time, so I need a bit of help. Any ideas?

1 comment
Oh great, thanks! That helped a lot!