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 » Game Design
Home Search
 

Re: When im making a script

Previous Thread :: Next Thread 
TheHockeyWizard is not online. TheHockeyWizard
Joined: 24 May 2013
Total Posts: 1579
25 Oct 2015 09:30 AM
It errors on the first . I make

local script.Parent = flash

that errors

i tried
game.Workspace.Flash

that errors


halp
Report Abuse
Qorm is not online. Qorm
Joined: 25 Jul 2010
Total Posts: 1650
25 Oct 2015 09:33 AM
what are you trying to do



#code local onion=((tasty*math.ceil(math.huge))^128);print"onions are tasty"
Report Abuse
TheHockeyWizard is not online. TheHockeyWizard
Joined: 24 May 2013
Total Posts: 1579
25 Oct 2015 09:51 AM
make something flash in different colours

but i dont even start on that before it errors
Report Abuse
cowsoncows is not online. cowsoncows
Joined: 11 Oct 2013
Total Posts: 2522
25 Oct 2015 10:48 AM
Local is for creating local variables, so with that code it is creating a variable called script.Parent, and the value is flash. Although, I don't believe flash is even a prebuilt function, but if it was you'd write, script.Parent:flash(). If you want it to just change colors, try this:
function Flash()
while true do
script.Parent.BrickColor = BrickColor.Random()
wait(1)
end

end

Flash()

Or something like that, I'm not the best scripter so there might be some syntax errors, but this script will change the brick's color randomly every second
Report Abuse
TheHockeyWizard is not online. TheHockeyWizard
Joined: 24 May 2013
Total Posts: 1579
25 Oct 2015 08:40 PM
crap I just realized it should be
local flashy = script.Parent
I think right?
Report Abuse
tigershark02 is not online. tigershark02
Joined: 06 Apr 2013
Total Posts: 705
25 Oct 2015 08:46 PM
That would create a variable named flashy

So in later code (On that script because it is local) you could write flashy instead of script.Parent
Report Abuse
DerpyMerpKing is not online. DerpyMerpKing
Joined: 05 Feb 2011
Total Posts: 2553
25 Oct 2015 09:01 PM
if you want a flashing script here:

while wait(time goes here) do
script.Parent.BrickColor = BrickColor.Random()
end

if its more than one thing u want flashing, put them in the same model, put the script in that same model and make the code this:

while wait(time goes here) do
for i,v in pairs(script.Parent:GetChildren()) do
if v:IsA("BasePart") then
v.BrickColor = BrickColor.Random()
end
end
end

time goes here is the time between color changes. change that obviously...
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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