Hello, I’m having troubles with creating marbles using my script, as I want the script to first get a player’s friend list, convert it to a number (example: player has 4 friends, 4 friends = 4 (number) ) and insert a decal that has the friend’s avatar thumbnail in it.
Here is the script’s code:
function make()
local marble = script.Parent.Marble:Clone()
--marble.Material="Marble"
marble.BrickColor=BrickColor.Random()
marble.Position=script.Parent.Position
marble.Velocity=Vector3.new(math.random(1,3),math.random(1,3),math.random(1,3))
marble.Anchored=false
marble.Transparency=0
marble.Name="Head"
local marble2 = Instance.new("Model")
marble2.Name="Marble #"..math.random(10000,99999)
marble2.Parent=script.Parent.Parent.marbles
marble.Parent=marble2
local hum = Instance.new("Humanoid")
hum.Health=0
hum.MaxHealth=0
hum.Parent=marble2
end
for i = 1,100 do
wait(0.001)
make()
end