Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I'm trying to script Materials and colors onto parts and it isn't working, help please?

Asked by 4 years ago

Do I have an error or do I have to put something before it??

Bridge1.Material = Enum.Material.Wood Bridge2.Material = Enum.Material.Wood Bridge3.Material = Enum.Material.Wood Bridge4.Material = Enum.Material.Wood Bridge5.Material = Enum.Material.Wood Bridge6.Material = Enum.Material.Wood Bridge7.Material = Enum.Material.Wood Bridge8.Material = Enum.Material.Wood Bridge9.Material = Enum.Material.Wood Bridge10.Material = Enum.Material.Wood Bridge11.Material = Enum.Material.Wood Bridge12.Material = Enum.Material.Wood Bridge13.Material = Enum.Material.Wood

game.Workspace.Brige1.BrickColor = BrickColor.new("Dirt brown") game.Workspace.Brige2.BrickColor = BrickColor.new("Dirt brown") game.Workspace.Brige3.BrickColor = BrickColor.new("Dirt brown") game.Workspace.Brige4.BrickColor = BrickColor.new("Dirt brown") game.Workspace.Brige5.BrickColor = BrickColor.new("Dirt brown") game.Workspace.Brige6.BrickColor = BrickColor.new("Dirt brown") game.Workspace.Brige7.BrickColor = BrickColor.new("Dirt brown") game.Workspace.Brige8.BrickColor = BrickColor.new("Dirt brown") game.Workspace.Brige9.BrickColor = BrickColor.new("Dirt brown") game.Workspace.Brige10.BrickColor = BrickColor.new("Dirt brown") game.Workspace.Brige11.BrickColor = BrickColor.new("Dirt brown") game.Workspace.Brige12.BrickColor = BrickColor.new("Dirt brown") game.Workspace.Brige13.BrickColor = BrickColor.new("Dirt brown")

0
Format your code properly, and your workspace bridge section is misspelled. All of them a missing a d. sidewinder44 20 — 4y
1
Could you put that in english please, i just started scripting yesterday xwainflameskul 16 — 4y
0
By formatting your code, I mean using the lua code blocks. It makes code easier to read. All of your "game.Workspace.Brige.BrickColor = BrickColor.new("Dirt brown")" lines are missing the letter D. sidewinder44 20 — 4y
0
Please use a for loops Flasker917 21 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

hello again you made a simple typing error, you typed Brige not Bridge

--specify where your parts are
local Bridge1 = game.Workspace.Bridge1
local Bridge2 = game.Workspace.Bridge2
local Bridge3 = game.Workspace.Bridge3
local Bridge4 = game.Workspace.Bridge4
local Bridge5 = game.Workspace.Bridge5
local Bridge6 = game.Workspace.Bridge6
local Bridge7 = game.Workspace.Bridge7
local Bridge8 = game.Workspace.Bridge8
local Bridge9 = game.Workspace.Bridge9
local Bridge10 = game.Workspace.Bridge10
local Bridge11 = game.Workspace.Bridge11
local Bridge12 = game.Workspace.Bridge12
local Bridge13 = game.Workspace.Bridge13

--materials
Bridge1.Material = Enum.Material.Wood 
Bridge2.Material = Enum.Material.Wood 
Bridge3.Material = Enum.Material.Wood 
Bridge4.Material = Enum.Material.Wood 
Bridge5.Material = Enum.Material.Wood 
Bridge6.Material = Enum.Material.Wood 
Bridge7.Material = Enum.Material.Wood 
Bridge8.Material = Enum.Material.Wood 
Bridge9.Material = Enum.Material.Wood 
Bridge10.Material = Enum.Material.Wood 
Bridge11.Material = Enum.Material.Wood 
Bridge12.Material = Enum.Material.Wood 
Bridge13.Material = Enum.Material.Wood

--colors
Bridge1.BrickColor = BrickColor.new("Dirt brown") 
Bridge2.BrickColor = BrickColor.new("Dirt brown") 
Bridge3.BrickColor = BrickColor.new("Dirt brown") 
Bridge4.BrickColor = BrickColor.new("Dirt brown") 
Bridge5.BrickColor = BrickColor.new("Dirt brown") 
Bridge6.BrickColor = BrickColor.new("Dirt brown") 
Bridge7.BrickColor = BrickColor.new("Dirt brown") 
Bridge8.BrickColor = BrickColor.new("Dirt brown") 
Bridge9.BrickColor = BrickColor.new("Dirt brown") 
Bridge10.BrickColor = BrickColor.new("Dirt brown") 
Bridge11.BrickColor = BrickColor.new("Dirt brown") 
Bridge12.BrickColor = BrickColor.new("Dirt brown") 
Bridge13.BrickColor = BrickColor.new("Dirt brown")

this will work

0
ohhhh that's what he ment xwainflameskul 16 — 4y
0
I fixed that and clicked run but still nothing showes up xwainflameskul 16 — 4y
0
It says that this line is not a valid member of workspace, local Bridge12 = game.Workspace.Bridge12 xwainflameskul 16 — 4y
0
thats prolly bc u named the part incorrectly Pitched_mobile 191 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

Ok, so were is the problem, does it changing the material?, does it changing the color?

also to see the errors go to view (you will find it at the top of your screen) and press output, if you see anything red when playing that is an error

Answer this question