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 someone fix this?

Previous Thread :: Next Thread 
zack785 is not online. zack785
Joined: 06 Feb 2009
Total Posts: 419
06 Nov 2012 08:00 PM
part = script.Parent.Parent.BrickA

local brick = script.Parent.Parent.BrickA
function onTouch(part)
part.CFrame = part.CFrame * CFrame.new(1,1,1)
end

part.Touched:connect(onTouch)



I made this in my spare time and I was super tired and bored, I have no idea where I messed up (because it's my first time trying this kind of thing, just using old tactics from other scripts I have made) so can someone please inform me where to fix it?
Report Abuse
zack785 is not online. zack785
Joined: 06 Feb 2009
Total Posts: 419
06 Nov 2012 08:02 PM
Also I know the "part = script.Parent.Parent.BrickA" is correct because I tested it, it's the onTouch part that's messing it up..
Report Abuse
FlipThePancake is not online. FlipThePancake
Joined: 26 Sep 2012
Total Posts: 676
06 Nov 2012 08:05 PM
[ Content Deleted ]
Report Abuse
zack785 is not online. zack785
Joined: 06 Feb 2009
Total Posts: 419
06 Nov 2012 08:06 PM
?
Report Abuse
crouton04 is not online. crouton04
Joined: 07 Jul 2010
Total Posts: 4459
06 Nov 2012 08:14 PM
Anchor the brick if you dont want it to fall first now if you just want to put the script in brick it's easier, if not if the block has to be in the workspace, and the local brick = is not needed.

rewrite

part = script.Parent.Parent.BrickA
function onTouch(part)
part.CFrame = part.CFrame * CFrame.new(1,1,1)
end

part.Touched:connect(onTouch)

didnt test it... remember to anchor it.
Report Abuse
hayes947 is not online. hayes947
Joined: 15 Nov 2010
Total Posts: 172
06 Nov 2012 08:42 PM
Other people see a script, I see a bunch of lines with no obvious purpose. DX What was the script intended to do anyways?
Report Abuse
zack785 is not online. zack785
Joined: 06 Feb 2009
Total Posts: 419
06 Nov 2012 09:19 PM
It's supposed to be something that starts an animation, once you touched the invisible wall then the bricks ahead of you start to lay down, as if your constructing the city.
Report Abuse
zack785 is not online. zack785
Joined: 06 Feb 2009
Total Posts: 419
06 Nov 2012 09:19 PM
I'm pretty good at making animations (I am pretty new to scripting but animating doesn't really take any skill, just a lot of time and testing...)
Report Abuse
zack785 is not online. zack785
Joined: 06 Feb 2009
Total Posts: 419
06 Nov 2012 10:31 PM
By the way none of the examples above worked, but thanks for trying..
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
06 Nov 2012 10:41 PM
local part = script.Parent


function onTouch()
part.CFrame = part.CFrame* CFrame.new(1,1,1)
end

part.Touched:connect(onTouch)

--sublime ya
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
06 Nov 2012 10:42 PM
whoops.

fix part, I was using it for testing.
Report Abuse
zack785 is not online. zack785
Joined: 06 Feb 2009
Total Posts: 419
06 Nov 2012 11:09 PM
That would be local though, it's in a model..
Report Abuse
zack785 is not online. zack785
Joined: 06 Feb 2009
Total Posts: 419
06 Nov 2012 11:12 PM
I made some edits but it still doesn't work..



part = script.Parent.Parent.BrickA

function onTouch(part)
script.Parent.Parent.BrickA.CFrame = script.Parent.Parent.BrickA.CFrame * CFrame.new(1,1,1)
end

part.Touched:connect(onTouch)
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
06 Nov 2012 11:15 PM
local part = script.Parent.Parent.BrickA --it works...


function onTouch()
part.CFrame = part.CFrame* CFrame.new(1,1,1)
end

part.Touched:connect(onTouch)

--sublime ya
Report Abuse
zack785 is not online. zack785
Joined: 06 Feb 2009
Total Posts: 419
06 Nov 2012 11:18 PM
I wanted it when you touched the parent of the script it CFrames that.
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
06 Nov 2012 11:19 PM
then use my first one..
Report Abuse
zack785 is not online. zack785
Joined: 06 Feb 2009
Total Posts: 419
06 Nov 2012 11:21 PM
Your second one worked but not the first one, and the second one is when you touch that brick.
Report Abuse
pashmi is not online. pashmi
Joined: 27 Jan 2010
Total Posts: 7120
07 Nov 2012 10:48 AM
Try this:

function onTouch(part2)
Workspace.part2.Cframe = Vector3.new [put the position here]

Workspace.part1:Touched:connect(onTouch)

-----------------

That should work :D
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