I have this game and it has two different game modes: Classic and spinner. I need my 'Game mode active' GUI to say which game mode is currently active, and make it disappear after 10 seconds. I'll include my game here as you may need to play it to get a better grip of what is going on. (You may need to wait a bit for the spinner to appear, the first game mode that shows up is random, but then it alternates.) Here is the script in the spinner that decides which game mode it will be.
local PickNum = math.random(1,2) local spinner= script.Parent spinner.CanCollide = false spinner.Anchored = true while true do if PickNum == 2 then spinner.Transparency = 0 elseif PickNum == 1 then spinner.Transparency = 1 end wait(180) PickNum = 3 - PickNum end
And here is my UI:
file:///Users/adam/Desktop/Screenshot%202020-05-07%20at%2014.25.53.png
The Label at the top spanning the top of the screen will be my game mode active UI.
Here are the rest of the script for my spinner.
sphere = script.Parent a = 0 repeat sphere.Rotation = Vector3.new( 0, a, 0) wait(.01) a = a+3.5 until false
Third script:
local Debounce = false script.Parent.Touched:connect(function(hit) if script.Parent.Transparency == 0 then if hit.Parent:FindFirstChild("Humanoid") and Debounce == false then Debounce = true hit.Parent.Humanoid:TakeDamage(35) wait(0.5) Debounce = false end end end)
Can anyone help?
You can make a StringValue
in Replicated Storage to hold the gamemode name. In a local script housed inside of the TextLabel
that you want to change, you could write:
game.ReplicatedStorage.StringValue.Changed:Connect(function(value) script.Parent.Text = value wait(10) script.Parent.Text = "" end)
This would show text once the stringValue.Value is changed, and wait 10 seconds and make it disappear.
I hoope this helps