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: Wrote my first ever script!

Previous Thread :: Next Thread 
astonmerrygoldmarvin is not online. astonmerrygoldmarvin
Joined: 02 Feb 2012
Total Posts: 2069
16 Jun 2013 11:18 AM
How is this? p = Workspace.Player1.Torso
while true do
p.Transparency = 0
wait(0.1)
p.Transparency = 0.1
wait(0.1)
p.Transparency = 0.2
wait(0.1)
p.Transparency = 0.3
wait(0.1)
p.Transparency = 0.4
wait(0.1)
p.Transparency = 0.5
wait(0.1)
p.Transparency = 0.6
wait(0.1)
p.Transparency = 0.7
wait(0.1)
p.Transparency = 0.8
wait(0.1)
p.Transparency = 0.9
wait(0.1)
p.Transparency = 1
wait(0.1)
p.Transparency = 0.9
wait(0.1)
p.Transparency = 0.8
wait(0.1)
p.Transparency = 0.7
wait(0.1)
p.Transparency = 0.6
wait(0.1)
p.Transparency = 0.5
wait(0.1)
p.Transparency = 0.4
wait(0.1)
p.Transparency = 0.3
wait(0.1)
p.Transparency = 0.2
wait(0.1)
p.Transparency = 0.1
wait(0.1)
p.Transparency = 0
wait(0.1)

end



You can test it if you like, but make sure you test it in Studio
Report Abuse
Tenal is not online. Tenal
Joined: 15 May 2011
Total Posts: 18684
16 Jun 2013 11:22 AM
X Everywhere
- REPETITION
- REPETITION EVERYWHERE

these captions aren't guaranteed to be correct
Report Abuse
lombardo2 is not online. lombardo2
Joined: 30 Nov 2008
Total Posts: 1604
16 Jun 2013 11:23 AM
Use math

local p = script.Parent
while true do
p.Transparency = math.abs(math.sin(({wait(0.1)})[2]))
end
Report Abuse
astonmerrygoldmarvin is not online. astonmerrygoldmarvin
Joined: 02 Feb 2012
Total Posts: 2069
16 Jun 2013 11:28 AM
Im a complete noob, idk what that means. qq Or how to use it.
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
16 Jun 2013 11:39 AM
lomb, that's amazing.
Report Abuse
RyanDolan123 is not online. RyanDolan123
Joined: 05 Mar 2009
Total Posts: 17919
16 Jun 2013 12:15 PM
If you don't wanna use advanced math then at least use something like this:

while wait(0.1) do
for i = 0,1,0.1 do
wait(0.1)
Workspace.Player1.Torso.Transparency = i
end
for i = 1,0,-0.1 do
wait(0.1)
Workspace.Player1.Torso.Transparency = i
end
end
Report Abuse
astonmerrygoldmarvin is not online. astonmerrygoldmarvin
Joined: 02 Feb 2012
Total Posts: 2069
16 Jun 2013 12:16 PM
Woah, Imma big fan Ryan, Your game ROCKS! xD And thanks. I'll try it sometime.
Report Abuse
RyanDolan123 is not online. RyanDolan123
Joined: 05 Mar 2009
Total Posts: 17919
16 Jun 2013 12:22 PM
Pro Tip: Don't show off inefficient scripts to us in the Scripters forum, nobody likes that :)

In fact, its much much better if you don't make inefficient scripts at all
Report Abuse
RyanDolan123 is not online. RyanDolan123
Joined: 05 Mar 2009
Total Posts: 17919
16 Jun 2013 12:23 PM
So basically just learn how to use loops

Or if you already 'learned' how to use loops, learn to use them more in your code
Report Abuse
astonmerrygoldmarvin is not online. astonmerrygoldmarvin
Joined: 02 Feb 2012
Total Posts: 2069
16 Jun 2013 12:25 PM
I dont know how to not make inefficient scripts. Im a noob. And i'm just excited because it's my first tip, and this was the kind of feedback i wanted, because i know what i could try out etc.
Report Abuse
RyanDolan123 is not online. RyanDolan123
Joined: 05 Mar 2009
Total Posts: 17919
16 Jun 2013 12:27 PM
ok
Report Abuse
NB3 is not online. NB3
Joined: 27 Dec 2009
Total Posts: 537
16 Jun 2013 12:28 PM
@Ryandolan123
I know how you feel...
Report Abuse
RyanDolan123 is not online. RyanDolan123
Joined: 05 Mar 2009
Total Posts: 17919
16 Jun 2013 12:31 PM
Yeah lol
Report Abuse
nairod7 is not online. nairod7
Joined: 26 Mar 2010
Total Posts: 869
16 Jun 2013 12:41 PM
It reminds me my first script :Q
Keep working on it! Also, make sure to check the wiki for tutorials (or luaLearners). Learn how to use functions, events, conditional statements and loops (needed in your case)...
Report Abuse
astonmerrygoldmarvin is not online. astonmerrygoldmarvin
Joined: 02 Feb 2012
Total Posts: 2069
16 Jun 2013 12:50 PM
@nair, Mk. FUnctions are...Hard xD
Report Abuse
NecroBumpist is not online. NecroBumpist
Joined: 12 Sep 2010
Total Posts: 4198
16 Jun 2013 12:52 PM
This is what my first scripts looked like.
Except I was manually changed the text of Messages to count and stuff.

Oh, fun times.
Keep learning, astonmerrygoldmarvin.
Report Abuse
RyanDolan123 is not online. RyanDolan123
Joined: 05 Mar 2009
Total Posts: 17919
16 Jun 2013 12:53 PM
function imafunction()
print("omg functions are so hard!!!")
end

imafunction()
Report Abuse
astonmerrygoldmarvin is not online. astonmerrygoldmarvin
Joined: 02 Feb 2012
Total Posts: 2069
16 Jun 2013 12:54 PM
lol
Report Abuse
nairod7 is not online. nairod7
Joined: 26 Mar 2010
Total Posts: 869
16 Jun 2013 12:57 PM
Functions aren't hard at all!

How to explain that easily... functions are... just like boxes, where you put some lines of code. Instead of writing all the time the same lines x times when you have to do it, you can just execute these lines once:

function BoxWithPrints()

print "Hello"
print "How are you?"

end


BowWithPrints() -- this line will execute all the line between "function BoxWithPrints()" and "end". We call the function BowWithPrints.

That's just a quick example. If you understand this, try to learn and _understand_ how to call functions with arguments, how to return a value at the end of a function, etc...

http://wiki.roblox.com/index.php/Functions
Report Abuse
astonmerrygoldmarvin is not online. astonmerrygoldmarvin
Joined: 02 Feb 2012
Total Posts: 2069
16 Jun 2013 12:58 PM
ty
Report Abuse
Parthax is not online. Parthax
Joined: 27 Apr 2011
Total Posts: 6941
16 Jun 2013 01:51 PM
i sense a disturbance
le waffle is coming....


cнecĸмαтe, ɴooвѕ.
Report Abuse
rabbidog is not online. rabbidog
Joined: 27 Jun 2011
Total Posts: 804
16 Jun 2013 01:54 PM
Get out, moron.
Report Abuse
GreenDay987 is not online. GreenDay987
Joined: 21 May 2011
Total Posts: 7027
16 Jun 2013 01:55 PM
What's the point of your posts? He gave a script, already was helped, but you guys WANT to post and start some kind of flame war again.

Disregard females, acquire currency.
Report Abuse
129K is not online. 129K
Joined: 23 Aug 2011
Total Posts: 19010
16 Jun 2013 05:59 PM
@rabbi - Actually, you get out.
@OP - Good job.
Report Abuse
Fattycat17 is not online. Fattycat17
Joined: 26 Jun 2011
Total Posts: 1527
16 Jun 2013 06:02 PM
Lol where is waffle he would go crazy seeing us helping this guy.
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