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
 

Size change not working?

Previous Thread :: Next Thread 
gIuton is not online. gIuton
Joined: 21 Apr 2015
Total Posts: 102
15 May 2015 12:39 PM
while true do
wait(1)
if script.Parent.Size1 == ("Small") then
script.Parent.Size = Vector3.new(3, 3, 3)
else if script.Parent.Size1 == ("Regular") then
script.Parent.Size = Vector3.new(10, 10, 10)
end
end
end

Size1 is a string value.
I tried doing CFrame.new but it wouldn't work.
The problem is the brick isn't changing its size?


Ey you like my sombrero? | rip hiddenreporter
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
15 May 2015 12:41 PM
Do you even need a while true do loop for this? Use the .Changed event!

if script.Parent.Size1 == ("Small") then

Should be:

if script.Parent.Size1.Value == "Small" then
Report Abuse
gIuton is not online. gIuton
Joined: 21 Apr 2015
Total Posts: 102
15 May 2015 12:44 PM
Didn't change anything.


Ey you like my sombrero? | rip hiddenreporter
Report Abuse
gIuton is not online. gIuton
Joined: 21 Apr 2015
Total Posts: 102
15 May 2015 12:53 PM
Help qq


Ey you like my sombrero? | rip hiddenreporter
Report Abuse
gIuton is not online. gIuton
Joined: 21 Apr 2015
Total Posts: 102
15 May 2015 01:22 PM
Seriously need help!


Ey you like my sombrero? | rip hiddenreporter
Report Abuse
LegitimatlyMe is not online. LegitimatlyMe
Joined: 30 Oct 2013
Total Posts: 1108
15 May 2015 01:27 PM
.Value
Report Abuse
Egzekiel is not online. Egzekiel
Joined: 10 Jan 2011
Total Posts: 1079
15 May 2015 01:33 PM
script.Parent.Size1.Changed:connect(function(newval)
if newval=="Small" then
script.Parent.Size=Vector3.new(3,3,3)
elseif newval=="Regular" then
script.Parent.Size=Vector3.new(10,10,10)
end
end

If your part contains a special mesh with a certain ID then you should use this instead:

script.Parent.Size1.Changed:connect(function(newval)
if newval=="Small" then
script.Parent.Mesh.Scale=Vector3.new(3,3,3)
elseif newval=="Regular" then
script.Parent.Mesh.Scale=Vector3.new(10,10,10)
end
end
Report Abuse
gIuton is not online. gIuton
Joined: 21 Apr 2015
Total Posts: 102
15 May 2015 01:35 PM
Oh my god! That's not the reason why it's not working! It's because it's a mesh and I'm trying to change the brick size! ugh simple mistakes -_-


Ey you like my sombrero? | rip hiddenreporter
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