Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Need help making a part clone another object?

I am trying to make a simple ball dispenser. I put the sphere in server storage to keep it out of the playing area. I want to set a part in my model to dispense a sphere every 3 seconds. I put print scripts to check if it works. The console does print the messages, but there are no sphere's spawning in the dispenser.

Here is my script, nothing happens. I wonder if my logic is wrong and the computer simply doesn't understand my order, or if my ball is in the wrong location.

-- Variables

 Dispenser = script.Parent

 DispenserPosition = Dispenser.Position

 Ball = game.ServerStorage.Ball 

 BallClone = Ball:Clone()

MyWorkspace = game.Workspace



 -- Cloning

 while Dispenser do

Dispenser.CanCollide = false

print('You can walk through me')

print(Dispenser.Position)




BallClone = DispenserPosition

wait(3)

  end

1 answer

✓ Accepted answer

you never sets the balls parent try add this code:

BallClone.Parent = game.Workspace

Also change:

BallClone= DispenserPosition

to:

BallClone.Position = DispenserPosition

This discussion is preserved as it was. New answers, comments, and votes are closed.