This script is a local script inside of a ScreenGui
I’ve had no errors from this script
but it seems to not work anyways
I’ve used – towards comments which should help you
local Players = game:GetService("Players")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local hover = game.Players.LocalPlayer.PlayerGui:WaitForChild("Hover")
local click = game.Players.LocalPlayer.PlayerGui:WaitForChild("Click")
local music = game.Players.LocalPlayer.PlayerGui:WaitForChild("Music")
local roundChanged = game.Players.LocalPlayer.PlayerGui:WaitForChild("RoundChange") -- round change music
local changingEvent = game.ReplicatedStorage.Bindable:WaitForChild("RoundChange") -- A Bindable Event in ServerStorage
local roundNumber = ReplicatedStorage:WaitForChild("RoundNumber") -- I have an int value in ServerStorage
local roundFrame = script.Parent:WaitForChild("RoundChangeFrame") -- the round frame
--changeRound function
local function changeRound()
roundFrame.TextLabel.Text = roundNumber.Value
wait(1)
roundChanged:Play()
wait(8.9)
roundFrame.TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
for i = 1,10 do
roundFrame.TextLabel.TextTransparency += 0.1
wait(.1)
end
wait(.1)
roundFrame.TextLabel.TextColor3 = Color3.fromRGB(255, 0, 4)
for i = 1,10 do
roundFrame.TextLabel.TextTransparency -= 0.1
wait(.1)
end
wait(.1)
roundFrame.TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
for i = 1,10 do
roundFrame.TextLabel.TextTransparency += 0.1
wait(.1)
end
wait(.1)
roundFrame.TextLabel.TextColor3 = Color3.fromRGB(255, 0, 4)
for i = 1,10 do
roundFrame.TextLabel.TextTransparency -= 0.1
wait(.1)
end
wait(.1)
roundFrame.TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
for i = 1,10 do
roundFrame.TextLabel.TextTransparency += 0.1
wait(1)
roundFrame.TextLabel.TextTransparency = 0
roundFrame.TextLabel.TextColor3 = Color3.fromRGB(255, 0, 4)
roundFrame.TextLabel.Text = roundNumber.Value + 1
wait(4)
roundChange:Stop()
return
end
--when I try to test this script by making a button activating a bindableEvent as seen here >>
bindableEvent.Event:Connect(function()
script.Parent.Enabled = true
controls:Disable()
music:Play()
tween:Play()
changeRound()
end)