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 » Scripting Helpers
Home Search
 

Re: Help me please!

Previous Thread :: Next Thread 
stuntkid257 is not online. stuntkid257
Joined: 12 Jul 2010
Total Posts: 1394
22 Jul 2011 05:58 PM
parts = game.Lighting.Track
bin = script.Parent

function onButton1Down(mouse)
target = mouse.Target
if target and target.Name == "Guide" then
game.Lighting.Track:Clone().Parent = workspace
parts:MoveTo(workspace.Guide.Position)
target:remove()
end

end

function onSelected(mouse)
mouse.Button1Down:connect(function() onButton1Down(mouse) end)

end

bin.Selected:connect(onSelected)

------------------

This script works, but not how I want it to work. When I click on a "Guide" it goes to a random "Guide" and I want it to go the position a specific "Guide" that I've clicked on. Any help?
Report Abuse
stuntkid257 is not online. stuntkid257
Joined: 12 Jul 2010
Total Posts: 1394
22 Jul 2011 05:59 PM
Oh and also, I want it to move to the angle the "Guide" is at. Example: If a "Guide" is tilted 45 degrees to the left, the track will go to the 45 degrees to the left. So I want it to Cframe to the "Guide" that you've clicked.
Report Abuse
Fluffy977 is not online. Fluffy977
Joined: 27 Dec 2008
Total Posts: 1331
22 Jul 2011 06:00 PM
I haven't scripted for a while but;

game.Lighting.Track:Clone().Parent = workspace

should be

game.Lighting.Track:Clone().Parent = Workspace

But everything else looks fine...
Report Abuse
stuntkid257 is not online. stuntkid257
Joined: 12 Jul 2010
Total Posts: 1394
22 Jul 2011 06:01 PM
No you can do that. It works with it like it is.
Report Abuse
Fluffy977 is not online. Fluffy977
Joined: 27 Dec 2008
Total Posts: 1331
22 Jul 2011 06:03 PM
Really? Ok, didn't know that. I always assumed everything was case sensitive. Good to know. As for your cFrame thing. I have no idea, but explain more of what happens you click on a target. And does output say anything?
Report Abuse
stuntkid257 is not online. stuntkid257
Joined: 12 Jul 2010
Total Posts: 1394
22 Jul 2011 06:04 PM
no output, it works fine but not how I want it to. I want the guide that you've clicked to cframe like the guide is.
Report Abuse
stuntkid257 is not online. stuntkid257
Joined: 12 Jul 2010
Total Posts: 1394
22 Jul 2011 08:38 PM
Someone please help me!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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