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
 

Requesting assistance

Previous Thread :: Next Thread 
bounty88 is not online. bounty88
Joined: 23 Sep 2008
Total Posts: 454
14 Mar 2012 04:46 PM
First before you criticize my script, i am NOT a good scripter.


while true do
local d = script.Parent.mesh
d.Scale.x = +1 - this is where the problem is occuring
d.Scale.z = +1 - same thing here
if d.Scale.x < 30 then
script.Parent.Transparency = + 0.05 - also here
if script.Parent.Transparency = 1 then
d.Scale.x = 1
d.Scale.z = 1
wait(1)
script.Parent.Transparency = 0
end

any way to fix this?
the output says: Workspace.Wave.Script:3: unexpected symbol near '+'
Report Abuse
bounty88 is not online. bounty88
Joined: 23 Sep 2008
Total Posts: 454
14 Mar 2012 04:50 PM
eh i would appreciate some responses please.
Report Abuse
TINISH0TZ is not online. TINISH0TZ
Joined: 20 Nov 2009
Total Posts: 2549
14 Mar 2012 04:51 PM
What do you want the mesh to do?
Report Abuse
xXStealthsniper200Xx is not online. xXStealthsniper200Xx
Joined: 30 Nov 2011
Total Posts: 2037
14 Mar 2012 04:52 PM
while true do
d = script.Parent.mesh
d.Scale = (+(1, 0, 0))
d.Scale = (+(0, 1, 0))
if d.Scale < (30, 0, 0) then
script.Parent.Transparency = (+(1.5))
if script.Parent.Transparency = 1 then
d.Scale = (1, 0, 0)
d.Scale = (0, 1, 0)
wait(1)
script.Parent.Transparency = 0
end

I don't know how your looking at the x and y of the mesh...

I can't remeber how it's set up.
Report Abuse
wafles26122 is not online. wafles26122
Joined: 14 Jun 2010
Total Posts: 958
14 Mar 2012 04:54 PM
You do NOT know how to add values do you?.....

You have to restate the value and then add to it:

d.Scale.x = d.Scale +1
d.Scale.z = d.Scale +1
Report Abuse
bounty88 is not online. bounty88
Joined: 23 Sep 2008
Total Posts: 454
14 Mar 2012 04:54 PM
basicly, it is supposed to grow like it is never stopping until it reaches 30 in the x and z box, then it is to slowly disappear and then the rest is just it reseting
Report Abuse
wafles26122 is not online. wafles26122
Joined: 14 Jun 2010
Total Posts: 958
14 Mar 2012 04:54 PM
@Stealthsniper

You clearly don't know how to script.....
Report Abuse
wafles26122 is not online. wafles26122
Joined: 14 Jun 2010
Total Posts: 958
14 Mar 2012 04:55 PM
    while true do
    local d = script.Parent.mesh
    d.Scale.x = d.Scale + 1
    d.Scale.z = d.Scale + 1
    if d.Scale.x < 30 then
    script.Parent.Transparency = script.Parent.Transparency + 0.05
    if script.Parent.Transparency = 1 then
    d.Scale.x = 1
    d.Scale.z = 1
    wait(1)
    script.Parent.Transparency = 0
    end
    end
    end
Report Abuse
NeonBlox is not online. NeonBlox
Joined: 19 Oct 2008
Total Posts: 1462
14 Mar 2012 04:56 PM
d.Scale.x = +1 - this is where the problem is occuring
d.Scale.z = +1 - same thing here

These lines wouldn't work because for one, a comment uses two hyphen's (--). However, the main problem is because you have to define what your adding one to. Use this.

d.Scale.x = d.Scale.x + 1 -- This is a comment
d.Scale.z = d.Scale.z + 1

Also remember to change this line:

script.Parent.Transparency = + 0.05

To this:

script.Parent.Transparency = script.Parent.Transparency + 0.05

Another error I spotted was in your if statement. In a if statement, your comparing. To compare you need two equal signs. Change the if statement to this.

if script.Parent.Transparency == 1 then

Lastly, the while statement and your first if statement do not have a end (because that end only ends the second if statement). You two more ends.

Overall, here is the fixed script. I may have missed some. Let me know if there is another error.

while true do
local d = script.Parent.mesh
d.Scale.x = d.Scale.x + 1
d.Scale.z = d.Scale.z + 1
if d.Scale.x < 30 then
script.Parent.Transparency = script.Parent.Transparency + 0.05
if script.Parent.Transparency == 1 then
d.Scale.x = 1
d.Scale.z = 1
wait(1)
script.Parent.Transparency = 0
end
end
end
Report Abuse
m0x is not online. m0x
Joined: 03 Nov 2011
Total Posts: 14
14 Mar 2012 04:56 PM
    while true do
        local d = script.Parent.mesh --Make sure "mesh" is the actual name
        d.Scale = d.Scale + Vector3.new(1,0,1)
        if d.Scale.X <​30 then
            script.Parent.Transparency = script.Parent.Transparency + 0.05
        end
        if script.Parent.Transparency == 1 then
            d.Scale.X = 1
            d.Scale.Z = 1
        end
        wait(1)
        script.Parent.Transparency = 0
    end
Report Abuse
xXStealthsniper200Xx is not online. xXStealthsniper200Xx
Joined: 30 Nov 2011
Total Posts: 2037
14 Mar 2012 04:58 PM
I can script but I never made a growth script, back off.

I rather script GUI's and make traps. :P
Report Abuse
link7002 is not online. link7002
Joined: 26 May 2009
Total Posts: 545
14 Mar 2012 04:58 PM
Just something to some of the people here, he asked for an answer, not to be told he can't script. It's called Scripting Helpers.
Report Abuse
xXStealthsniper200Xx is not online. xXStealthsniper200Xx
Joined: 30 Nov 2011
Total Posts: 2037
14 Mar 2012 04:59 PM
Also I never scripted meshes, I never looked at their x, y, z set-up or whatever.
Report Abuse
m0x is not online. m0x
Joined: 03 Nov 2011
Total Posts: 14
14 Mar 2012 04:59 PM
NeonBlox, because you put the `wait()` in a condition, the script will instantly change scale and transparency, only stopping for 1 second when that condition is true.
Report Abuse
m0x is not online. m0x
Joined: 03 Nov 2011
Total Posts: 14
14 Mar 2012 05:01 PM
@link7002

> Just something to some of the people here, he asked for an answer, not to be told he can't script. It's called Scripting Helpers.

Derp, only 1 person said that and he wasn't talking to the person wanting an answer.
Report Abuse
NeonBlox is not online. NeonBlox
Joined: 19 Oct 2008
Total Posts: 1462
14 Mar 2012 05:03 PM
Thanks for pointing that out, when I originally looked at the script I didn't see the first if statement so I saw the wait as something that would always run. Then I found it and didn't reconsider that fact that the wait was in it.
Report Abuse
Nikilie is not online. Nikilie
Joined: 28 Jun 2011
Total Posts: 6132
14 Mar 2012 05:07 PM
I am a boss.
Report Abuse
bounty88 is not online. bounty88
Joined: 23 Sep 2008
Total Posts: 454
14 Mar 2012 05:11 PM
okay thanks to you guys i solved that problem, but another arose. It is reading the script wrong

1 while true do
2 local d = script.Parent.mesh
3 local q = script.Parent
4 d.Scale.x = d.Scale +1
5 d.Scale.z = d.Scale +1
6 if d.Scale.x < 30 then
7 q.Transparency = q.Transparency +0.05
8 if script.Parent.Transparency = 1 then --- but i have it right here????
9 d.Scale.x = 1
10 d.Scale.z = 1
11 wait(1)
12 script.Parent.Transparency = 0
13 end

Output: Workspace.Wave.Script:8: 'then' expected near '='
Report Abuse
NeonBlox is not online. NeonBlox
Joined: 19 Oct 2008
Total Posts: 1462
14 Mar 2012 05:13 PM
You should have read my post and many other peoples. if statements compare things, when you compare things, you need 2 equal signs. Using 1 equal sign assigns a value.

Use this line:

if script.Parent.Transparency == 1 then
Report Abuse
m0x is not online. m0x
Joined: 03 Nov 2011
Total Posts: 14
14 Mar 2012 09:21 PM
Use my script.
Report Abuse
Secretiverobocop is not online. Secretiverobocop
Joined: 23 Apr 2011
Total Posts: 510
14 Mar 2012 09:29 PM
I love how none of the above response really payed atantion. Allow me.

while true do
local d = script.Parent.mesh
d.Scale.x = +1 - this is where the problem is occuring
d.Scale.z = +1 - same thing here
if d.Scale.x < 30 then
script.Parent.Transparency = + 0.05 - also here
if script.Parent.Transparency = 1 then
d.Scale.x = 1
d.Scale.z = 1
wait(1)
script.Parent.Transparency = 0
end

Look in line 3, 4, and 6. Notice he had a "-" instead of a "--"

DE DEE DEE!
-Secret
Report Abuse
wafles26122 is not online. wafles26122
Joined: 14 Jun 2010
Total Posts: 958
16 Mar 2012 08:27 PM
dude...The problem was he was using = + we already fixed that.....pay attention.....
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