|
| 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 |
|
|
| |
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 12 Sep 2015 09:53 PM |
trying that rn
http://www.roblox.com/i-warned-u-about-stairs-bro-item?id=156732659 |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|