|
| 18 Mar 2013 03:25 PM |
player = script.Parent.Parent.Parent mouse = player:GetMouse() mouse.Button1Up:connect(function() part = Instance.new("Part",game.Workspace) part.Position = Vector3.new(mouse.Target) --here part.Anchored = true end)
It works,but it won't position at the spot that i put it in... |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 03:26 PM |
| What do you mean 'spot that i put it in...' |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 03:53 PM |
| like when i click at a position(you know how we click),it doesn't position itself there,it go to the position of 0,0,0.. |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 03:56 PM |
.Target returns an object value. You want .Hit sense it returns a CFrame value. |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 04:24 PM |
| btw i tried that before i posted and still doesn't work... D: |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 04:25 PM |
Perhaps it broke? if mouse.Hit then |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 04:25 PM |
| Vector3.new(CFrame.new(mouse.Hit)) |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 04:29 PM |
local Player = script.Parent.Parent.Parent local Mouse = Player:GetMouse()
Mouse.Button1Up:connect(function() if Mouse.Hit then local Part = Instance.new("Part", Game.Workspace) Part.Anchored = true Part.Position = Vector3.new(Mouse.Hit.p) end end) |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 04:32 PM |
Never mind it doesn't break. You can remove the "if Mouse.Hit then" and the end |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 04:33 PM |
| tried that too before,still no work. |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 04:33 PM |
| okay i will try that after the other suggestion! |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 04:35 PM |
Mine works I tested it. The only thing I can think of is maybe your "Player = script.Parent...." is off some. |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 04:37 PM |
| okay i will use a localscript. |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 04:41 PM |
| can you show me your version of the script? |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Mar 2013 04:46 PM |
player = script.Parent.Parent.Parent mouse = player:GetMouse() mouse.Button1Up:connect(function() part = Instance.new("Part",game.Workspace) part.Position = mouse.Hit.p part.Anchored = true end)
It must be as local script and placed somewhere in player/character). |
|
|
| Report Abuse |
|
|