TimmyyDev
(timmy)
December 21, 2020, 5:11pm
#1
I need to be able to click a gui and then the map will go disco like the admin command, :Disco. When I click the gui the map doesn’t go onto disco.
The issue is I can’t get it to work when I click the gui.
(The photo below is located in Server Script Service)
(This is in a local script inside the gui)
(The other scripts you can see in the “Disco” GUI are running different things when the gui is clicked. They work.)
Although I don’t even know if ColorCorrectionEffects can achieve this, you might want to give it an try.
I’ll just do some search, to avoid time wasting.
TimmyyDev
(timmy)
December 21, 2020, 5:15pm
#3
Thank you, I haven’t got a clue what the problem is.
game.Lighting.Ambient = BrickColor.random().color
Ambient is supposed to be a Color3 value, isn’t it? Not a BrickColor value
game.Lighting.Ambient = Color3.fromRGB(math.random(-255,255),math.random(-255,255),math.random(-255,255))
Oh, wait, I think I noticed it.
You didn’t set the value of isDisco
to anything. Setting it to not it / the reverse of it won’t work. You need to set the value of it to false, by default.
And ColorCorrectionEffect.TintColor (roblox.com) seems to have a very similar effect, if not the same, to Kohl’s Admin Command’s disco command’s effect.
Edit: After just testing, Lighting.Ambient
already seems to achieve that. You should rather keep what you have.
Wait, was that overuse of ’ ?
TimmyyDev
(timmy)
December 21, 2020, 5:19pm
#6
Oh, thank you! I’ll also try the block of code that was sent by jack.
TimmyyDev
(timmy)
December 21, 2020, 5:19pm
#7
Thank you, ill try it right now.
1 Like
TimmyyDev
(timmy)
December 21, 2020, 5:21pm
#8
That unfortunately didn’t work.
TimmyyDev
(timmy)
December 21, 2020, 5:22pm
#9
Ill set the value and try that right now,
The isDisco
value needs to be defined by something first before that while loop can work
TimmyyDev
(timmy)
December 21, 2020, 5:25pm
#11
I have defined it haven’t I? At the top. ‘Local isDisco;’ Also means, local isDisco = false
No, it’s defining it as a nil value
Just change local isDisco;
to this local isDisco = false
and see if any changes are made
TimmyyDev
(timmy)
December 21, 2020, 5:30pm
#13
Alright. Will do. Thank you. .
Oh yeah another thing: You can add print statements as well to see where your line of code stops
TimmyyDev
(timmy)
December 21, 2020, 5:32pm
#15
Nice!! I’ll add it in, also changing it to local isDisco = false, that hasn’t changed anything.
TimmyyDev
(timmy)
December 21, 2020, 5:35pm
#16
Nothing is even printing, I don’t think the script it even running.
Xeptix
(Xep)
December 21, 2020, 5:38pm
#17
That should work, even if he doesn’t define it as anything.
Player.Team returns a Team
instance, not the team name. You are comparing an instance to a string
Player.Team.Name is what you are looking for: Player.Team
TimmyyDev
(timmy)
December 21, 2020, 5:39pm
#18
Alright, let me try that right now please bare with me.
Xeptix
(Xep)
December 21, 2020, 5:40pm
#19
Correction - You are comparing the Player.Team to the Team instance, that is not the problem. I misread your code.
The only thing I can think of is that the script is disabled, or you are not firing the remote event from a client at all.
TimmyyDev
(timmy)
December 21, 2020, 5:41pm
#20
Ive edited it and Ive checked nothing is disabled.