I’m making a jeopardy game, and this script turns makes the walls and logo smoothplastic, then makes the walls red. After 30 seconds, it should make the walls blue, and the walls and logo neon. However, nothing happens when I press the button. This is a serverscript inside the button meant to activate it.
script.Parent.MouseButton1Click:Connect(function()
game.Workspace.walls.Union.Material = Enum.Material.SmoothPlastic
game.Workspace.walls.Union.BrickColor = BrickColor.new(255,0,0)
game.Workspace.logo.Union.Material = Enum.Material.SmoothPlastic
wait(30)
game.Workspace.walls.Union.Material = Enum.Material.Neon
game.Workspace.walls.Union.BrickColor = BrickColor.new(51,77,220)
game.Workspace.logo.Union.Material = Enum.Material.Neon
end
Possibly attempt changing “BrickColor” to “Color3”
1 Like
knawIege
(knawlege)
June 29, 2020, 8:54pm
3
Try this:
script.Parent.MouseButton1Click:Connect(function()
game.Workspace.walls.Union.Material = “SmoothPlastic”
game.Workspace.walls.Union.BrickColor = Color3.new(255,0,0)
game.Workspace.logo.Union.Material = “SmoothPlastic”
wait(30)
game.Workspace.walls.Union.Material = “Neon”
game.Workspace.walls.Union.BrickColor = Color3.new(51,77,220)
game.Workspace.logo.Union.Material = “Neon”
end
So, Color3.new(255,0,0)?
30chars
game.Workspace.walls.Union.Color = Color3.new(255,0,0)
Does this have anything to do with it?
Mixu_78
(Mixu_78)
June 29, 2020, 8:57pm
7
That happens when you hit shift-enter, you can just select all the code, Ctrl-X it and Ctrl-V it back and it gets fixed.
1 Like
Unfortunately, none of these solutions worked, even though I used the control x to remove the unicode character error.
255, 0, 0 is meant for “Really red”, correct?
Mixu_78
(Mixu_78)
June 29, 2020, 9:00pm
10
What does your code look like right now?
You could possibly try:
BrickColor = BrickColor.new(‘Really red’)
game.Workspace.walls.Union.Material = ""SmoothPlastic""
game.Workspace.walls.Union.BrickColor = Color3.new(255,0,0)
game.Workspace.logo.Union.Material = "SmoothPlastic"
wait(30)
game.Workspace.walls.Union.Material = "Neon"
game.Workspace.walls.Union.BrickColor = Color3.new(51,77,220)
game.Workspace.logo.Union.Material = "Neon"
end```
Mixu_78
(Mixu_78)
June 29, 2020, 9:01pm
13
There’s your error. Change the quotes to " instead of “”. And the BrickColor to Color as @Salutiants said.
1 Like
Oh, change the “BrickColor” to “Color”
game.Workspace.walls.Union.Color = Color3.new(255,0,0)
game.Workspace.walls.Union.Color = Color3.new(51,77,220)
How do I change the quotes? There’s just one " button on my keyboard.
Mixu_78
(Mixu_78)
June 29, 2020, 9:03pm
16
You simply don’t press it twice.
“” = two " quotes
" = one " quote
Seoarro
(seo)
June 29, 2020, 9:04pm
17
I’m surprised nobody has realized this. It’s supposed to be Color3.fromRGB().
2 Likes
game.Workspace.walls.Union.Material = "SmoothPlastic"
game.Workspace.walls.Union.Color = Color3.new(255,0,0)
game.Workspace.logo.Union.Material = "SmoothPlastic"
wait(30)
game.Workspace.walls.Union.Material = "Neon"
game.Workspace.walls.Union.Color = Color3.new(51,77,220)
game.Workspace.logo.Union.Material = "Neon"
end
still doesn’t work
Mixu_78
(Mixu_78)
June 29, 2020, 9:06pm
19
What part of it doesn’t work? 30 chars
Nothing happens when I click the button.