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
 

-

Previous Thread :: Next Thread 
rtardbob123 is not online. rtardbob123
Joined: 13 Feb 2010
Total Posts: 15868
13 Oct 2013 01:27 PM
script.Parent.Touched:connect(function(hit)
if hit.Parent and hit.Parent.Name=='wave' then
print(hit.Parent.Name)
for i, v in pairs(hit.Parent:GetChildren()) do
v.CFrame=v.CFrame+Vector3.new(0,-10,0)
end
end
end)
Report Abuse
rtardbob123 is not online. rtardbob123
Joined: 13 Feb 2010
Total Posts: 15868
13 Oct 2013 03:53 PM
bump
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
13 Oct 2013 03:57 PM
script.Parent.Touched:connect(function(Hit)
if Hit and Hit.Parent and Hit.Parent.Name == 'wave' then
print(Hit.Parent.Name)
for i,v in next, Hit.Parent:GetChildren() do
if v:IsA('BasePart') then
v.CFrame = v.CFrame + Vector3.new(0,-10,0)
end
end
end
end)
Report Abuse
rtardbob123 is not online. rtardbob123
Joined: 13 Feb 2010
Total Posts: 15868
13 Oct 2013 04:03 PM
same results
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
13 Oct 2013 04:05 PM
Then the name of the parent is not 'wave'
Report Abuse
rtardbob123 is not online. rtardbob123
Joined: 13 Feb 2010
Total Posts: 15868
13 Oct 2013 04:06 PM
yes it is
lol
Report Abuse
getkoed is not online. getkoed
Joined: 18 Feb 2010
Total Posts: 2298
13 Oct 2013 04:08 PM
v.CFrame = v.CFrame * CFrame.new(0, -10, 0)
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
13 Oct 2013 04:12 PM
Does it print the parent's name?
Report Abuse
rtardbob123 is not online. rtardbob123
Joined: 13 Feb 2010
Total Posts: 15868
13 Oct 2013 04:13 PM
nope
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
13 Oct 2013 04:14 PM
"Then the name of the parent is not 'wave'"
Report Abuse
getkoed is not online. getkoed
Joined: 18 Feb 2010
Total Posts: 2298
13 Oct 2013 04:15 PM
v.CFrame = v.CFrame * CFrame.new(0, -10, 0)

.-.
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
13 Oct 2013 04:17 PM
@get, that's not going to help.
Report Abuse
rtardbob123 is not online. rtardbob123
Joined: 13 Feb 2010
Total Posts: 15868
13 Oct 2013 04:18 PM
still nothing...
Report Abuse
getkoed is not online. getkoed
Joined: 18 Feb 2010
Total Posts: 2298
13 Oct 2013 04:18 PM
try it at least.
Report Abuse
rtardbob123 is not online. rtardbob123
Joined: 13 Feb 2010
Total Posts: 15868
13 Oct 2013 04:19 PM
Get if it doesn't print why do you think it will get to the CFrame part of the script?
Report Abuse
getkoed is not online. getkoed
Joined: 18 Feb 2010
Total Posts: 2298
13 Oct 2013 04:20 PM
also

- put the print outside the if statement
- there's no use for the i, so you could just say for _, v in pairs
Report Abuse
getkoed is not online. getkoed
Joined: 18 Feb 2010
Total Posts: 2298
13 Oct 2013 04:21 PM
I am very sorry I tried to help you, dear kind sir.
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
13 Oct 2013 04:21 PM
@get, just stop.
Report Abuse
getkoed is not online. getkoed
Joined: 18 Feb 2010
Total Posts: 2298
13 Oct 2013 04:22 PM
Zach, I thought this forum exists to get advanced scripters to help others?

Speaking of 'advanced scripters', I think it's you who should get out.
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
13 Oct 2013 04:25 PM
I am an advanced scripter, I can prove that. I never told you to get out, I just told you to stop because all of your posts whave done nothing to help.

@re, try this:

script.Parent.Touched:connect(function(Hit)
if Hit and Hit.Parent and Hit.Parent.Name ~= 'wave' then
print(Hit.Parent.Name)
for i,v in next, Hit.Parent:GetChildren() do
if v:IsA('BasePart') then
v.CFrame = v.CFrame + Vector3.new(0,-10,0)
end
end
end
end)

If it moves the parts, that means the parent name isn't 'wave' thus proving my other posts correct.
Report Abuse
getkoed is not online. getkoed
Joined: 18 Feb 2010
Total Posts: 2298
13 Oct 2013 04:26 PM
It's funny, cause what you did is simply call hit Hit and add an if statement. Now that helps (applause etc)

+ What you just posted will make anything that is NOT called wave move.

Herr advanced Scriptor
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
13 Oct 2013 04:29 PM
It does help. I changed it to 'Hit' because I like to capitalize my variables. I added an if statement because if one of the children isn't a base part that means it doesn't have a CFrame, which means the script would error.

"+ What you just posted will make anything that is NOT called wave move."

Please read my FULL post before saying something stupid like this.
Report Abuse
rtardbob123 is not online. rtardbob123
Joined: 13 Feb 2010
Total Posts: 15868
13 Oct 2013 04:30 PM
Still nothing
I changed the model's name to 'a'
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
13 Oct 2013 04:31 PM
No output?
Report Abuse
rtardbob123 is not online. rtardbob123
Joined: 13 Feb 2010
Total Posts: 15868
13 Oct 2013 04:32 PM
Nope
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