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: Script help

Previous Thread :: Next Thread 
labioliver is not online. labioliver
Joined: 19 Jun 2009
Total Posts: 135
23 Mar 2017 01:01 PM
So i'm trying to make a script which changes the color of marshmellow head to brown, when touching a brick above fire.

I tried creating it but i do not know what have I done wrong

local cookingPart = script.Parent

local function cookMarshmellow(tool)
local cook = Instance.new("BrickColor")
cook.BrickColor.new(int 1014)
cook.Name = "Cooked Marshmallow"
cook.Parent = Players
end

cookingpart.Touched:connect(cookMarshmellow)

Im a really noob scripter, started today.
Report Abuse
ParionFire is not online. ParionFire
Joined: 24 Jan 2015
Total Posts: 141
23 Mar 2017 01:13 PM
I think it's like this:

local cookingPart = script.Parent

function cookMarshmallow(tool)
local cook = Instance.new("BrickColorValue")
cook.Value = BrickColor.new("Bright red")
cook.Name = "Cooked Marshmallow"
cook.Parent = game.Players
end

cookingPart.Touched:connect(cookMarshmallow)

You can't use an int for a value

change the "Bright red" to wichever color you'd like


Report Abuse
ParionFire is not online. ParionFire
Joined: 24 Jan 2015
Total Posts: 141
23 Mar 2017 01:14 PM
*You can't use an int for a brickcolorvalue


Report Abuse
Auracyte is online. Auracyte
Joined: 01 Feb 2011
Total Posts: 330
23 Mar 2017 01:16 PM
Change
local cook = Instance.new("BrickColor")

to

local cook = Instance.new("Part")
Report Abuse
ParionFire is not online. ParionFire
Joined: 24 Jan 2015
Total Posts: 141
23 Mar 2017 01:16 PM
Btw this just sets the colorValue, but it does not assign the color to a brick


Report Abuse
Auracyte is online. Auracyte
Joined: 01 Feb 2011
Total Posts: 330
23 Mar 2017 01:16 PM
Welp nvm lmao
Report Abuse
labioliver is not online. labioliver
Joined: 19 Jun 2009
Total Posts: 135
23 Mar 2017 01:19 PM
how to assign color to a brick?
Report Abuse
ParionFire is not online. ParionFire
Joined: 24 Jan 2015
Total Posts: 141
23 Mar 2017 01:22 PM
place the part in workspace, then this:

game.Workspace.(Name of part).BrickColor = BrickColor.new("Bright red")

again, change "Bright red" to whatever color wich is available in the palette


Report Abuse
labioliver is not online. labioliver
Joined: 19 Jun 2009
Total Posts: 135
23 Mar 2017 01:29 PM
Im trying to add the color changing effect to a tool upon colliding with a part, which is touched by brick above bonfire.
if i put the script location to workspace, after picking it up from ground, it goes to backpack, what directory do i need to put then?
Report Abuse
ParionFire is not online. ParionFire
Joined: 24 Jan 2015
Total Posts: 141
23 Mar 2017 01:38 PM
game.Players.BackPack

it is inside the character when it is equipped so then it is:

game.Workspace.(Playername)


Report Abuse
labioliver is not online. labioliver
Joined: 19 Jun 2009
Total Posts: 135
23 Mar 2017 02:00 PM
thank you for the help, finally got it to work
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