|
| 02 Oct 2014 10:52 PM |
mouse.Move:connect(function() if mouse.Target ~= nil then local hitPoint = mouse.Hit:toObjectSpace(script.Parent.NewBP.Value.Union.CFrame).p script.Parent.NewBP.Value:MoveTo(hitPoint.Position) end end)
main part of the script attempted to take some lines from roblox dragger tool, couldnt quite get it.
~I'm an Angry Llama~ |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 02 Oct 2014 11:19 PM |
'script.Parent.NewBP.Value:MoveTo(hitPoint.Position)'
.Value:MoveTo
ummm |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2014 11:20 PM |
oops forgot to mention,
NewBP is an object value.
~I'm an Angry Llama~ |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 02 Oct 2014 11:22 PM |
Oh my bad,
Is there any output? |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2014 11:26 PM |
There is, but heres fixed script:
mouse.Move:connect(function() if mouse.Target ~= nil then --script.Parent.NewBP.Value:MoveTo(mouse.h) local hitPoint = mouse.Hit:toObjectSpace(script.Parent.NewBP.Value.Union.CFrame).p script.Parent.NewBP.Value:MoveTo(hitPoint) end end)
Not output, model glitches around everywhere, when ever i move my mouse, not even close to my mouse.
~I'm an Angry Llama~ |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 02 Oct 2014 11:29 PM |
'There is, but heres fixed script:'
So you got it fixed or no? If not can you make it into a model (With the NewBP or whatever else is needed to test it) |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2014 11:32 PM |
plr = game.Players.LocalPlayer mouse = plr:GetMouse()
mouse.KeyDown:connect(function(key) if script.Parent.Parent.Visible then print(key:byte()) if key:byte() == 93 then script.Parent.Check.Value = "Created" repeat wait() until script.Parent.NewBP.Value ~= nil mouse.Move:connect(function() if mouse.Target ~= nil then script.Parent.NewBP.Value:MoveTo(mouse.hit.p) end end) end end end)
Model now follows mouse, but as mouse moves, the mouse is ontop of the model, and then model appears closer, if that makes sense.
~I'm an Angry Llama~ |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 02 Oct 2014 11:37 PM |
| Try doing it with a single brick rather than a model of parts and see what happens |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2014 11:53 PM |
Wouldnt really change much because the mouse will still be on a part.
~I'm an Angry Llama~ |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 02 Oct 2014 11:58 PM |
| Maybe the mouse is ontop of the model, so it moves the model to where the mouse is on the model, and keeps doing that and thats why it gets closer |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 03 Oct 2014 02:14 AM |
| Add a check at the :MoveTo to check if your mouse.Target is a member of NewBP.Value |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2014 02:52 AM |
This helps, but cant get precision "moving" when placing this "newbp"
The roblox dragger tool uses what i need, it goes through the part, and gets the next object found. tricky to explain :P
~I'm an Angry Llama~ |
|
|
| Report Abuse |
|
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 03 Oct 2014 05:00 AM |
Toobjectspace might be wrong
But youll probably need to filter the mouse too since otherwise it can target the same part in the model making it able to fky to infinity |
|
|
| Report Abuse |
|
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 03 Oct 2014 05:09 AM |
Toobjectspace might be wrong
But youll probably need to filter the mouse too since otherwise it can target the same part in the model making it able to fky to infinity |
|
|
| Report Abuse |
|
|
Moxiii
|
  |
| Joined: 06 Mar 2012 |
| Total Posts: 1198 |
|
|
| 03 Oct 2014 09:17 AM |
I didn't make much of an attempt to understand this, but, if your problem is mouse.Target becoming a child of a model you don't want targeted, parent it to the player's character.
Pretty sure mouse.Target goes through anything in a character. |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2014 11:58 PM |
@Moxiii
Yayy it works! Thank you so much!!!!!!@@@!!!! :D :D
~I'm an Angry Llama~ |
|
|
| Report Abuse |
|
|
|
| 04 Oct 2014 12:14 AM |
ogm another llama
hi
i'm a whale |
|
|
| Report Abuse |
|
|