generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Help - Spawning a golf ball

Previous Thread :: Next Thread 
nottinghamftw is not online. nottinghamftw
Joined: 05 Jun 2011
Total Posts: 825
05 Apr 2015 03:00 AM
I wondered if anyone could help me. I want to make it so when a golf ball hits a hole the game deletes that ball and spawns a new one. I know its a large thing, I am just not great with scripting yet.

Thanks for time.
Report Abuse
Wittiest is not online. Wittiest
Joined: 02 Mar 2009
Total Posts: 9665
05 Apr 2015 03:19 AM
local ball = script.Parent
local ball1 = ball:Clone()
holename = '' --name of the part the ball will be touching
ball.Touched:connect(function(hit)
if hit.Name == holename then
game:GetService('Debris'):AddItem(ball,1)
ball1.Parent=workspace
end
end)
Report Abuse
nottinghamftw is not online. nottinghamftw
Joined: 05 Jun 2011
Total Posts: 825
07 Apr 2015 07:08 AM
Thanks for answering.
Quick question, does that go into the ball, or where the ball will spawn?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image