|
| 02 Sep 2013 03:25 PM |
script.Parent.MouseButton1Down:connect(function() Mouse.Move:connect(function() Mouse.Button1Down:connect(function() if Mouse.Target.Name == "1" then peashooter = game.Lighting:findFirstChild("Peashooter"):clone() p = Mouse.Target.Position peashooter:MoveTo(Vector3.new(p)) else script.Parent.Parent.Parent.Parent.Parent:findFirstChild("MessageGui").Frame.TextLabel.Text = "You connot place that item there!" end end) end) end)
All it's supposed to do check if you've clicked something and if the mouse target's name is 1, clone and reposition "Peashooter"
Yes, it is in a LocalScript |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
ZakDarke
|
  |
| Joined: 22 Sep 2012 |
| Total Posts: 178 |
|
| |
|
| |
|
|
| 02 Sep 2013 03:43 PM |
| why are all these idiots in SH |
|
|
| Report Abuse |
|
|
| |
|
|
| 02 Sep 2013 03:44 PM |
| Also 'Mouse' isn't defined |
|
|
| Report Abuse |
|
|
| |
|
pbjms
|
  |
| Joined: 12 Mar 2010 |
| Total Posts: 5534 |
|
|
| 02 Sep 2013 03:45 PM |
script.Parent.MouseButton1Down:connect(function(Mouse) Mouse.Move:connect(function() Mouse.Button1Down:connect(function() if Mouse.Target.Name == "1" then peashooter = game.Lighting:findFirstChild("Peashooter"):clone() p = Mouse.Target.Position peashooter:MoveTo(Vector3.new(p)) else script.Parent.Parent.Parent.Parent.Parent:findFirstChild("MessageGui").Frame.TextLabel.Text = "You connot place that item there!" end end) end) end) |
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 02 Sep 2013 03:46 PM |
didnt define mouse horrible inefficient number expected where given userdata(vector3)
script.Parent.MouseButton1Down:wait() local m=game.Players.LocalPlayer:GetMouse() Mouse.Button1Down:connect(function() if Mouse.Target.Name == "1" then peashooter = game.Lighting:findFirstChild("Peashooter"):clone() p = Mouse.Hit.p peashooter:MoveTo(p) else script.Parent.Parent.Parent.Parent.Parent:findFirstChild("MessageGui").Frame.TextLabel.Text = "You connot place that item there!" end end) |
|
|
| Report Abuse |
|
|
|
| 02 Sep 2013 03:51 PM |
| UR MOM IS FAT THAT'S WHAT SHE DIED |
|
|
| Report Abuse |
|
|
|
| 02 Sep 2013 03:59 PM |
@ilikeyou p = mouse.Hit.p?? wat is the second p |
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 02 Sep 2013 04:02 PM |
| p is a member of CFrame that returns the Vector3 value |
|
|
| Report Abuse |
|
|
| |
|
|
| 02 Sep 2013 04:08 PM |
| seriously how did all these idiots get in SH |
|
|
| Report Abuse |
|
|
| |
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 02 Sep 2013 04:12 PM |
then check if Peashooter is in lighting make sure your hierarchy for the textlabel is correct make sure there are parts in the workspace named 1 |
|
|
| Report Abuse |
|
|
|
| 02 Sep 2013 04:18 PM |
then check if Peashooter is in lighting -yes make sure your hierarchy for the textlabel is correct -yes make sure there are parts in the workspace named 1 -yes |
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 02 Sep 2013 04:21 PM |
is the script local? did you click on the GUI first, and then something in the workspace named 1? |
|
|
| Report Abuse |
|
|
| |
|