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: Part moves after being resized by a script

Previous Thread :: Next Thread 
bo00OOO00om is not online. bo00OOO00om
Joined: 14 Jan 2015
Total Posts: 581
31 Jul 2015 10:32 PM
I'm trying to recreate the shrinking tiles from Super Mario Galaxy, but the tiles keep moving above me when my character steps on them.

The Script:
part = script.Parent
a = 4
script.Parent.Touched:connect(function()
repeat
part.Size = Vector3.new(a, 1, a)
a = a - 0.1
wait(0.01)
until a == 0
script.Parent.Transparency = 0
script.Parent.CanCollide = false
end)




https://www.youtube.com/watch?v=2DXEjOZ7Iuw
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
31 Jul 2015 10:35 PM
Errors?
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
31 Jul 2015 10:37 PM
-- Size and Position properties hate to clip. Luckily, CFrame doesn't.

part = script.Parent
a = 4
part.Touched:connect(function()
local center = part.CFrame
repeat
part.Size = Vector3.new(a, 1, a)
a = a - 0.1
part.CFrame = center
wait(0.01)
until a == 0
script.Parent.Transparency = 0
script.Parent.CanCollide = false
end
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
31 Jul 2015 10:37 PM
Her original works fine for me in studio.
Report Abuse
bo00OOO00om is not online. bo00OOO00om
Joined: 14 Jan 2015
Total Posts: 581
31 Jul 2015 10:59 PM
But now after activation, it won't change to normal size after a few seconds! And it also won't go transparent

The script:
part = script.Parent
decal = part.Decal
a = 4
debounce = true
part.Touched:connect(function()
local center = part.CFrame
if debounce == true then
repeat
debounce = false
part.Size = Vector3.new(a, 1, a)
a = a - 0.05
part.CFrame = center
wait(0.02)
until a == 0

part.Transparency = 1
decal.Transparency = 1
part.CanCollide = false
wait(3)
part.Transparency = 0
decal.Transparency = 0
part.CanCollide = true
part.Size = Vector3.new(4, 1, 4)
debounce = true
end
end)




https://www.youtube.com/watch?v=2DXEjOZ7Iuw
Report Abuse
bo00OOO00om is not online. bo00OOO00om
Joined: 14 Jan 2015
Total Posts: 581
31 Jul 2015 11:07 PM
lllllll


https://www.youtube.com/watch?v=2DXEjOZ7Iuw
Report Abuse
bo00OOO00om is not online. bo00OOO00om
Joined: 14 Jan 2015
Total Posts: 581
31 Jul 2015 11:09 PM
I NEED ANSWERS QUICKLY

https://www.youtube.com/watch?v=2DXEjOZ7Iuw
Report Abuse
bo00OOO00om is not online. bo00OOO00om
Joined: 14 Jan 2015
Total Posts: 581
31 Jul 2015 11:12 PM
SOMEONE AT LEAST ANSWER THIS


https://www.youtube.com/watch?v=2DXEjOZ7Iuw
Report Abuse
bo00OOO00om is not online. bo00OOO00om
Joined: 14 Jan 2015
Total Posts: 581
31 Jul 2015 11:17 PM
DOES SOMEONE EVEN NOTICE THIS THREAD???!!!!


https://www.youtube.com/watch?v=2DXEjOZ7Iuw
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
31 Jul 2015 11:21 PM
-- Made some edits.


part = script.Parent
decal = part.Decal
debounce = true
part.Touched:connect(function()
local center = part.CFrame
if debounce == true then
debounce = false
local a = 4
repeat
debounce = false
part.Size = Vector3.new(a, 1, a)
a = a - 0.05
part.CFrame = center
wait(0.02)
until a <= 0

part.Transparency = 1
decal.Transparency = 1
part.CanCollide = false
wait(3)
part.Transparency = 0
decal.Transparency = 0
part.CanCollide = true
part.Size = Vector3.new(4, 1, 4)
part.CFrame = center
debounce = true
end
end)
Report Abuse
bo00OOO00om is not online. bo00OOO00om
Joined: 14 Jan 2015
Total Posts: 581
31 Jul 2015 11:22 PM
THANKS I LOVE YOU


https://www.youtube.com/watch?v=2DXEjOZ7Iuw
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