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: Someone Give Me A Beginner Scripting Task

Previous Thread :: Next Thread 
DopeMixtape is not online. DopeMixtape
Joined: 05 Jan 2015
Total Posts: 381
30 Jun 2015 08:30 PM
I read and done everything on this game: http://www.roblox.com/games/199996918/Learn-to-script-Scripting-Methods

Can someone please give me a task to do?
Report Abuse
drager980 is not online. drager980
Joined: 25 May 2009
Total Posts: 13385
30 Jun 2015 08:33 PM
make a function that calls itself again when it fires but it will only call itself again once



AND THE TIGER GOES ROAR
Report Abuse
Twistir is not online. Twistir
Joined: 19 Nov 2009
Total Posts: 12374
30 Jun 2015 08:35 PM
Make it so when a player touches a part, the part turns red, and then explodes
Report Abuse
Tynezz is not online. Tynezz
Joined: 28 Apr 2014
Total Posts: 4945
30 Jun 2015 08:36 PM
Make a calculator with addition, subtraction, division and multiplication.

Also look at this for more :)
http://wiki.roblox.com/index.php?title=Function_dump/Mathematical_functions




~Tynezz
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
30 Jun 2015 08:41 PM
create a throwable knife
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
30 Jun 2015 08:54 PM
Loop through a model and name each part

Part1
Part2
Part3
Part4
etc.
Report Abuse
DopeMixtape is not online. DopeMixtape
Joined: 05 Jan 2015
Total Posts: 381
30 Jun 2015 09:40 PM
@waarspyking

Managed to finally do it with a little of remembering :D

Script:
-- You can place it anywhere, just make sure the script is in the brick (Haven't Tested out anything

if script.Parent.Anchored == false then
script.Parent.Anchored = true -- Just to make sure it's anchored :P
end

debounce = false

function Explosion()
if debounce == true then return end
debounce = true
script.Parent.BrickColor = BrickColor.new("Bright red")
wait(1)
Instance.new("Explosion", game.Workspace).Position = script.Parent.Position
wait(0.5)
script.Parent.BrickColor = BrickColor.new("Medium stone grey")
debounce = false
end

script.Parent.Touched:connect(Explosion)
Report Abuse
DopeMixtape is not online. DopeMixtape
Joined: 05 Jan 2015
Total Posts: 381
30 Jun 2015 09:41 PM
@drager Idk what you mean...

The rest of y'all I'll do later tonight, thanks for the excersise. :D
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
30 Jun 2015 09:44 PM
Make a Part

On MouseClick

Change the Character who clicked it's Torso to Sand blue
Report Abuse
Shagmeister is not online. Shagmeister
Joined: 24 Jul 2014
Total Posts: 266
30 Jun 2015 10:12 PM
Make your own miniature admin script. Always a great learning experience, requires string library knowledge and if you want a clever system also requires string pattern knowledge
Report Abuse
inception101 is not online. inception101
Joined: 19 Dec 2010
Total Posts: 738
30 Jun 2015 10:22 PM
Create a brick that randomly moves in each direction +-5 studs every 3 seconds. Make sure the brick does not go below the baseplate. If the player clicks the brick, make it rotate 90 degrees one way randomly. It's good to practice CFrame and Vector3 values.

-inception101 (Trade,Development,Design)
Report Abuse
kert109 is not online. kert109
Joined: 31 Dec 2009
Total Posts: 681
30 Jun 2015 10:36 PM
Make a part that changed color in a pre defined list of colors every 1 second.

>Disco Floor
Report Abuse
DopeMixtape is not online. DopeMixtape
Joined: 05 Jan 2015
Total Posts: 381
30 Jun 2015 11:26 PM
@bosswalrus
That was a fairly easy one (Took 5 minutes). Script:
function TorsoColor()
game.Workspace.Player.Torso.BrickColor = BrickColor.new("Sand blue") -- Changes Torso Color to "Sand blue"
end

script.Parent.ClickDetector.MouseClick:connect(TorsoColor) -- If you click on the Part, it will make your Torso Sand blue
Report Abuse
DopeMixtape is not online. DopeMixtape
Joined: 05 Jan 2015
Total Posts: 381
30 Jun 2015 11:30 PM
@Shagmeister I'm not very familiar with string library knowledge and string pattern knowledge, could you send me some links about that please? Thanks
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
01 Jul 2015 01:20 AM
@Dope want to know my version, so it will work for every player?

Layout: Part > ClickDetector > Script

script.Parent.MouseClick:connect(function(PlayerWhoClicked)
local Char = PlayerWhoClicked.Character
Char.Torso.BrickColor = BrickColor.new("Sand blue")
end
Report Abuse
DopeMixtape is not online. DopeMixtape
Joined: 05 Jan 2015
Total Posts: 381
01 Jul 2015 01:24 AM
@bosswalrus Ah, I'm not familiar with functions with arguments but It works. :D
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
01 Jul 2015 01:28 AM
That stuff is kind of handy
http://wiki.roblox.com/index.php?title=Anonymous_function

Also

http://wiki.roblox.com/index.php?title=MouseClick
RBXScriptSignal MouseClick (
Player playerWhoClicked
)

and

Parameters:
playerWhoClicked
Type: Player

Means it kind of returns the Player that clicked the block

so like

function Clicked(Player)--I called this PlayerWhoClicked last time
Player.Character.Torso.BrickColor = BrickColor.new("Sand blue")
end

script.Parent.MouseClick:connect(Clicked)

It still works but the way I did it, is the way I like doing it and it is faster for me.
There are pros and cons to both ways though, if you want to discuss that I suggest starting a new thread.

I used: http://wiki.roblox.com/index.php?title=Anonymous_function
Report Abuse
DopeMixtape is not online. DopeMixtape
Joined: 05 Jan 2015
Total Posts: 381
01 Jul 2015 05:20 PM
@bosswalrus The thing I don't get about parameters is how the script knows what it is when you use it in a function. Also, can a parameter be anything you want it to be?
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
01 Jul 2015 06:45 PM
That is a frequently asked question. I even asked that the first time.

Im not too knowledgable about it. I just know that if you use an event

Touched, MouseClick, Watever you choose.

type it into the wiki.roblox.com search bar

*types in MouseClick*

Page:

Event of Clickdetector icon.pngClickDetector
RBXScriptSignal MouseClick (
Player playerWhoClicked
)
Parameters:
playerWhoClicked
Type: Player

Description: Fired when the ClickDetector's parent is clicked.

-Sees it returns the player that clicked the block

That means it has that a paramater.
Report Abuse
DopeMixtape is not online. DopeMixtape
Joined: 05 Jan 2015
Total Posts: 381
01 Jul 2015 08:09 PM
Alright, I'll look into that, thanks
Report Abuse
DopeMixtape is not online. DopeMixtape
Joined: 05 Jan 2015
Total Posts: 381
01 Jul 2015 08:10 PM
I also just realized you joined 2 years and a day before me on this account lol
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