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: Help

Previous Thread :: Next Thread 
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
18 Jul 2011 12:54 PM
No error message, but it doesn't seem to do anything.




d = true
Pads = {"Pad1", "Pad2", "Pad3", "Pad4"}

script.Parent.Touched:connect(function(hit)
if not d then return end
d = false
if hit.Name ~= "Food" or hit.Name ~= "Can" then d = true return end
hit:MoveTo(script.Parent[math.random(1,#Pads)].Position)
hit.Anchored = true
end)
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
18 Jul 2011 01:04 PM
The simple "Help" title doesn't seem to get clicks anymore.


Anyway, this just moves a brick to a certain position an anchors it
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
18 Jul 2011 01:13 PM
I think most of the views are from me.
Report Abuse
comiconor is not online. comiconor
Joined: 26 May 2009
Total Posts: 16893
18 Jul 2011 01:31 PM
[ Content Deleted ]
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
18 Jul 2011 01:34 PM
if hit.Name ~= "Food" or hit.Name ~= "Can" then d = true return end

Common sense (which some people surprisingly lack, no offense)

if hit.Name ~= "Food" and hit.Name ~= "Can" then d = true return end

Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
18 Jul 2011 01:36 PM
@Citymaster, you must be talking about yourself because that means I need both food and can to hit it to work.


T_T
Report Abuse
comiconor is not online. comiconor
Joined: 26 May 2009
Total Posts: 16893
18 Jul 2011 01:37 PM
[ Content Deleted ]
Report Abuse
comiconor is not online. comiconor
Joined: 26 May 2009
Total Posts: 16893
18 Jul 2011 01:37 PM
[ Content Deleted ]
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
18 Jul 2011 01:38 PM
"or" cannot be used there. if name ~= "Food" or name ~= "Can"
If the name is not equal to food or the name is not equal to can.
Report Abuse
comiconor is not online. comiconor
Joined: 26 May 2009
Total Posts: 16893
18 Jul 2011 01:39 PM
[ Content Deleted ]
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
18 Jul 2011 01:39 PM
~= means not eqaul to!
Report Abuse
comiconor is not online. comiconor
Joined: 26 May 2009
Total Posts: 16893
18 Jul 2011 01:40 PM
[ Content Deleted ]
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
18 Jul 2011 01:41 PM
And saying that I make no sense. My turn to flame ;P
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
18 Jul 2011 01:43 PM
If hit.Name *IS NOT* "Food" or hit.Name *IS NOT* "Can" then RETURN END!
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
18 Jul 2011 01:43 PM
Using "if" statement "or" doesn't work. Idk why, but thats reason why there is things like this:

somthing = "cat"

if somthing == "dog" then
print("Its dog!")
elseif somthing == "rat" then
print("Its rat!")
end

Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
18 Jul 2011 01:44 PM
You can't do that. Just say it outloud and you will get it. You want it so if the name is not food or can then it retunrs right? Use and.
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
18 Jul 2011 01:45 PM
If the hit's name is not food or can then return end.

It seems okay to me.
Report Abuse
comiconor is not online. comiconor
Joined: 26 May 2009
Total Posts: 16893
18 Jul 2011 01:46 PM
[ Content Deleted ]
Report Abuse
donut222 is not online. donut222
Joined: 09 Jun 2009
Total Posts: 1837
18 Jul 2011 01:46 PM
[ Content Deleted ]
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
18 Jul 2011 01:47 PM
WHY THE HECK CAN'T YOU JUST ACCEPT THAT IT HAS TO BE "AND" NOT "OR".
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
18 Jul 2011 01:48 PM
@donut. Wtp? Thats nosence for this thread.
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
18 Jul 2011 01:48 PM
He's totally on the wrong part.
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
18 Jul 2011 01:49 PM
citymaster22, you should know that the script still doesn't work, even with and.

:)
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
18 Jul 2011 01:51 PM
That's a different issue. Is tehre any output now?
Report Abuse
Fl0x is not online. Fl0x
Joined: 06 Aug 2010
Total Posts: 5169
18 Jul 2011 01:53 PM
All I can say is...
MoveTo is not a valid member of BasePart.
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