So, I'm making a game, ColourSink, I've fixed other issues in the game, like lerping and BodyPositions. But this one is just frustrating. Even with proper scripting, this keeps on repeating the same Slab over and over again.
I want it so it chooses a different Slab every time the minigame repeats but instead, it does this, over and over.
https://i.gyazo.com/9a3eb10e0e22a9a9f5038393e1db08c4.mp4
But it basically chooses the same colour over and over.
Thing is, I think my scripting is right.
Here is my scripting, it looks correct to me, but what do I know. I'm still a beginner.
function colourS() slabs = game.Workspace.ColourSink.Slabs:GetChildren() ranNum1 = math.random(1, #slabs) slabChosen = slabs[ranNum1] for i = 0, 1, 0.5 do game.Workspace.ColourSink.Billboard.Part.SurfaceGui.TextLabel.Text = slabChosen.Colour.Value wait(2) slabChosen.CFrame = slabChosen.CFrame:lerp(slabChosen.endpart.CFrame, 0.5) wait(4) slabChosen.CFrame = slabChosen.CFrame:lerp(slabChosen.startpart.CFrame, 1) game.Workspace.ColourSink.Billboard.Part.SurfaceGui.TextLabel.Text = "Colour" wait() end end
This is the best I can get the format to, sorry.
Any help would be appreciated, thank you!