Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Unique dance floor script?

I'm making a party place and hoping to add a dance floor to it, but I'm not 100% sure how to make one that's very festive and unique. Like the dance floor in "Club Red" or "Club Boates". I do however know how to make a script that makes a brick change random colors but ill only resort to that if I can't figure this out. Help please. (Here a video of what I mean: https://m.youtube.com/watch?v=WbydpP6ICos)

3 comments

0

What exactly makes "Club Boates" and "Club Red" their dancefloors unique? (I don't know them, probably not the only one)

0

It's very hard to explain, but it's like the surface of the floor changes colors at the same time and different times, the squares changes their shape, specific colors flow in a wave-like motion. It's better for you to see it, if i find a good video for an example then I'll put it in the explanation.

0

It's a SurfaceGui

3 answers

✓ Accepted answer

They are using SurfaceGui on their dance floor. Take a look at: SurfaceGui on the Wiki for more informations.

It's acting like a normal ScreenGui, but on a Part's Surface.

local TIMETOWAIT = 1

while wait(TIMETOWAIT) do
	script.Parent.BrickColor = BrickColor.Random()
end

Here is the script for Random colors. Put it inside the brick. Change the TIMETOWAIT to the time you want the script wait until it changes.

Accept if it helped.

Do this:

local timetowait = 3
while wait(timetowait) do
	for _, tile in pairs(workspace.DanceFloor:GetChildren()) do
		tile.BrickColor = BrickColor.Random()
	end
end

This I think will be good.

local PickColor = math.random(1, 7)
local WaitTime = 1 --change this to your likings

Instance.new("SurfaceGui", script)
Instance.new("Frame", script.SurfaceGui)

local PickColor2 = script.SurfaceGui.Frame -- DO NOT MOVE THIS BEFORE THE INSTANCE.NEW STATEMENT

while wait(WaitTime) do
	if PickColor == 1 then
		PickColor2.BackroundColor3 = Color3.fromRGB(255, 0, 0) --makes red
	elseif PickColor == 2 then
		PickColor2.BackroundColor3 = Color3.fromRBG(255, 255, 0) --makes yellow
	elseif PickColor == 3 then
		PickColor2.BackroundColor3 = Color3.fromRGB(0, 255, 0) --makes green
	elseif PickColor == 4 then
		PickColor2.BackroundColor3 = Color3.fromRGB(0, 0, 255) --makes dark blue
	elseif PickColor == 5 then
		PickColor2.BackroundColor3 = Color3.fromRGB(255, 0, 220) --makes pink
	end
end

Color3.fromRGB is just to change the color of the frame. Just insert that and change the wait time, and it would be ready in no time! Accept answer if this helps!

This discussion is preserved as it was. New answers, comments, and votes are closed.