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 » Scripters
Home Search
 

Re: Growing bricks

Previous Thread :: Next Thread 
NekuSakuraba1 is not online. NekuSakuraba1
Joined: 03 Apr 2012
Total Posts: 2516
12 Sep 2015 09:37 PM
So I'm trying to make a snowball that grows every time it hits a snow brick (basically whatever has the script in it)

The first time the snowball hits a snow brick it grows, but after that it will react to other snow bricks but not grow any larger.

This is what's in the snow block script:

local snowtouched = false

function onGrow(hit)
if not snowtouched then
snowtouched = true
if hit.Name == "Snowball" then
hit.CFrame = hit.CFrame + CFrame.new(0,.5,0)
hit.Size = hit.Size + Vector3.new(.5,.5,.5)
local snowpatch = script.Parent
snowpatch.Transparency = 1
wait(10)
snowpatch.Transparency = 0
snowtouched = false
end
end
end

script.Parent.Touched:connect(onGrow)


I'm new to scripting so sorry for any facenukes I may cause


http://www.roblox.com/i-warned-u-about-stairs-bro-item?id=156732659
Report Abuse
tentastic2 is not online. tentastic2
Joined: 03 May 2009
Total Posts: 241
12 Sep 2015 09:41 PM
There's an extra end
Report Abuse
NekuSakuraba1 is not online. NekuSakuraba1
Joined: 03 Apr 2012
Total Posts: 2516
12 Sep 2015 09:41 PM
I take it somebody is face-palming hard?


http://www.roblox.com/i-warned-u-about-stairs-bro-item?id=156732659
Report Abuse
tentastic2 is not online. tentastic2
Joined: 03 May 2009
Total Posts: 241
12 Sep 2015 09:43 PM
oh wait nvm I misread it because of the indentations.
It should work, the only thing that you'd need to change is the
hit.CFrame = hit.CFrame * CFrame.new(0, 0.25, 0)

and make sure the Snowballs names are actyally "Snowball"
Report Abuse
NekuSakuraba1 is not online. NekuSakuraba1
Joined: 03 Apr 2012
Total Posts: 2516
12 Sep 2015 09:43 PM
wait wat

removed the extra and and output says im missing one


http://www.roblox.com/i-warned-u-about-stairs-bro-item?id=156732659
Report Abuse
NekuSakuraba1 is not online. NekuSakuraba1
Joined: 03 Apr 2012
Total Posts: 2516
12 Sep 2015 09:44 PM
oops my posts are a bit laggy

thx


http://www.roblox.com/i-warned-u-about-stairs-bro-item?id=156732659
Report Abuse
tentastic2 is not online. tentastic2
Joined: 03 May 2009
Total Posts: 241
12 Sep 2015 09:44 PM
Or you should actually remove that line since the ball is unanchored and rolling, correct? THat would mean that the ball's y direction is not necessarily always up.
Report Abuse
NekuSakuraba1 is not online. NekuSakuraba1
Joined: 03 Apr 2012
Total Posts: 2516
12 Sep 2015 09:46 PM
i removed that line and the snowballs are actually named Snowball

the problem is still happening though

is there another method of scaling objects that I don't know of?

http://www.roblox.com/i-warned-u-about-stairs-bro-item?id=156732659
Report Abuse
tentastic2 is not online. tentastic2
Joined: 03 May 2009
Total Posts: 241
12 Sep 2015 09:51 PM
Oh, and balls are symmetric.

They have to grow by 1 and can't grow by .5.

so the size has to be + Vector3.new(1, 1, 1)
Report Abuse
NekuSakuraba1 is not online. NekuSakuraba1
Joined: 03 Apr 2012
Total Posts: 2516
12 Sep 2015 09:53 PM
trying that rn


http://www.roblox.com/i-warned-u-about-stairs-bro-item?id=156732659
Report Abuse
NekuSakuraba1 is not online. NekuSakuraba1
Joined: 03 Apr 2012
Total Posts: 2516
12 Sep 2015 09:56 PM
it works!
(well sometimes >:L)

thanks for your help, I'll take it from here


http://www.roblox.com/i-warned-u-about-stairs-bro-item?id=156732659
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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