|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 22 Jul 2011 06:01 PM |
| No you can do that. It works with it like it is. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|
| |
|