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: Can anyone tell my why this won't work?

Previous Thread :: Next Thread 
Minimalistic is not online. Minimalistic
Joined: 28 Jul 2013
Total Posts: 1090
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
Minimalistic is not online. Minimalistic
Joined: 28 Jul 2013
Total Posts: 1090
02 Sep 2013 03:35 PM
bump
Report Abuse
OpenWindowPokeManiac is not online. OpenWindowPokeManiac
Joined: 05 Apr 2013
Total Posts: 2263
02 Sep 2013 03:40 PM
[ Content Deleted ]
Report Abuse
Pokemaster73 is not online. Pokemaster73
Joined: 07 May 2010
Total Posts: 19646
02 Sep 2013 03:40 PM
becus it doesnt
Report Abuse
ZakDarke is not online. ZakDarke
Joined: 22 Sep 2012
Total Posts: 178
02 Sep 2013 03:43 PM
cos u fail
k?
Report Abuse
shooterbomb is not online. shooterbomb
Joined: 01 Oct 2012
Total Posts: 1845
02 Sep 2013 03:43 PM
@Open UR MAMA
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
02 Sep 2013 03:43 PM
why are all these idiots in SH
Report Abuse
OpenWindowPokeManiac is not online. OpenWindowPokeManiac
Joined: 05 Apr 2013
Total Posts: 2263
02 Sep 2013 03:43 PM
[ Content Deleted ]
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
02 Sep 2013 03:44 PM
Also 'Mouse' isn't defined
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
02 Sep 2013 03:45 PM
Open, get out of SH.
Report Abuse
pbjms is not online. 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 is not online. 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
Mediocrity is not online. Mediocrity
Joined: 13 Apr 2012
Total Posts: 8722
02 Sep 2013 03:51 PM
UR MOM IS FAT THAT'S WHAT SHE DIED
Report Abuse
Minimalistic is not online. Minimalistic
Joined: 28 Jul 2013
Total Posts: 1090
02 Sep 2013 03:59 PM
@ilikeyou
p = mouse.Hit.p??
wat is the second p
Report Abuse
iIikeyou is not online. 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
Minimalistic is not online. Minimalistic
Joined: 28 Jul 2013
Total Posts: 1090
02 Sep 2013 04:08 PM
Still doesn't work.
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
02 Sep 2013 04:08 PM
seriously how did all these idiots get in SH
Report Abuse
Minimalistic is not online. Minimalistic
Joined: 28 Jul 2013
Total Posts: 1090
02 Sep 2013 04:11 PM
@dog
twitter :/
Report Abuse
iIikeyou is not online. 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
Minimalistic is not online. Minimalistic
Joined: 28 Jul 2013
Total Posts: 1090
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 is not online. 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
Minimalistic is not online. Minimalistic
Joined: 28 Jul 2013
Total Posts: 1090
02 Sep 2013 04:35 PM
yes.
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