I am having some troubles when it comes to manipulating Player GUIs when it comes to effecting all players. The main is function is after pressing the begin button it will say to all players that a raid is commencing. It will then fade to dark, which I only have working so far.
https://gyazo.com/d4c907909ec866c5212a909b66975e1d
This is what should display.
This is the code for the ServerScriptService without the GUI stuff as it does not work for me there.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RaidBegin = ReplicatedStorage:WaitForChild("Test")
local plr = game.Players.LocalPlayer
--local Announcement = game:GetService("Lighting").InvasionNotification:clone().Parent == plr.PlayerGui
--Announcement.Parent = plr.PlayerGUI
--Process
-- 1) Screen Fates to Black
-- 2) Screen Unfates to see view from different Camera
-- 3) Sees GUI Instruction
-- 4) 5 Second Beeping
-- 5) Can begin playing
RaidBegin.OnServerEvent:connect(function()
--Announcement.Announcement.Visible = true
wait (0.1)
game.Lighting.ColorCorrection.Brightness = -0.1
wait (0.1)
game.Lighting.ColorCorrection.Brightness = -0.2
wait (0.1)
game.Lighting.ColorCorrection.Brightness = -0.3
wait (0.1)
game.Lighting.ColorCorrection.Brightness = -0.4
wait (0.1)
game.Lighting.ColorCorrection.Brightness = -0.5
wait (0.1)
game.Lighting.ColorCorrection.Brightness = -0.6
wait (0.1)
game.Lighting.ColorCorrection.Brightness = -0.7
wait (0.1)
game.Lighting.ColorCorrection.Brightness = -0.8
wait (0.1)
game.Lighting.ColorCorrection.Brightness = -0.9
wait (0.1)
game.Lighting.ColorCorrection.Brightness = -1
--Announcement.Announcement.Visible = false
wait(5)
wait (0.1)
game.Lighting.ColorCorrection.Brightness = -0.9
wait (0.1)
game.Lighting.ColorCorrection.Brightness = -0.8
wait (0.1)
game.Lighting.ColorCorrection.Brightness = -0.7
wait (0.1)
game.Lighting.ColorCorrection.Brightness = -0.6
wait (0.1)
game.Lighting.ColorCorrection.Brightness = -0.5
wait (0.1)
game.Lighting.ColorCorrection.Brightness = -0.4
wait (0.1)
game.Lighting.ColorCorrection.Brightness = -0.3
wait (0.1)
game.Lighting.ColorCorrection.Brightness = -0.2
wait (0.1)
game.Lighting.ColorCorrection.Brightness = -0.1
wait(0.1)
game.Lighting.ColorCorrection.Brightness = 0
game.workspace.Beep:Play()
wait(5)
print("End Of Script")
end)
script.Parent.MouseButton1Down:connect(function()
if RaidSystem.RaidStatusChosen.Value == false then
gui.Begin.Text = "A Raid Status has not been chosen, please select one"
wait(2)
gui.Begin.Text = "Begin"
else
RaidMenu:TweenPosition(UDim2.new(0.385, 0, 1.3, 0), "Out", "Quad", 0.5, true)
-- Countdown()
game.ReplicatedStorage.Test:FireServer()
if RaidSystem.PR.Value == true then
print("Begin PR")
else
print("Begin Official Raid")
end
end
end)