Can you help me?
ServerScriptService - MainScript (Normal script)
local ReplicatedStorage = game:GetService("ReplicatedStorage") local PlrCamera = game.Workspace.CurrentCamera local ServerStorage = game:GetService("ServerStorage") local Status = ReplicatedStorage.Status local Player = game:GetService("Players").LocalPlayer local MapsFolder = game.ServerStorage.Maps while true do wait(1) if game.Players.NumPlayers <2 then Status.Value = "Waiting for 2 players!" repeat wait(1) until game.Players.NumPlayers >= 2 --Countdown (i used different style but i didn't work so i made it this way lol) Status.Value = "Break 20" wait(1) Status.Value = "Break 19" wait(1) Status.Value = "Break 18" wait(1) Status.Value = "Break 17" wait(1) Status.Value = "Break 16" wait(1) Status.Value = "Break 15" wait(1) Status.Value = "Break 14" wait(1) Status.Value = "Break 13" wait(1) Status.Value = "Break 12" wait(1) Status.Value = "Break 11" wait(1) Status.Value = "Break 10" wait(1) Status.Value = "Break 9" wait(1) Status.Value = "Break 8" wait(1) Status.Value = "Break 7" wait(1) Status.Value = "Break 6" wait(1) Status.Value = "Break 5" wait(1) Status.Value = "Break 4" wait(1) Status.Value = "Break 3" wait(1) Status.Value = "Break 2" wait(1) Status.Value = "Break 1" wait(1) Status.Value = "Break ended" wait(1) Status.Value = "Intermission 10" wait(1) Status.Value = "Intermission 9" wait(1) Status.Value = "Intermission 8" wait(1) Status.Value = "Intermission 7" wait(1) Status.Value = "Intermission 6" wait(1) Status.Value = "Intermission 5" wait(1) Status.Value = "Intermission 4" wait(1) Status.Value = "Intermission 3" wait(1) Status.Value = "Intermission 2" wait(1) Status.Value = "Intermission 1" wait(1) Status.Value = "Intermission" game.ReplicatedStorage.IsInGame.Value = true local plrs = {} for i, player in pairs(game.Players:GetPlayers()) do if player then table.insert(plrs,player) end end wait(2) local AvailableMaps = MapsFolder:GetChildren() local ChosenMap = AvailableMaps[math.random(1,#AvailableMaps)] Status.Value = ChosenMap.Name.." Chosen" local MapSpawn = ChosenMap:Clone() MapSpawn.Parent = workspace wait(2) local Killer = {} local KillerChosen = plrs[math.random(1,#plrs)] Status.Value = "The killer is "..KillerChosen.Name table.insert(Killer,1,KillerChosen) wait(2) wait() Killer[1].Character:WaitForChild("HumanoidRootPart").CFrame = CFrame.new(166.4, 110.3, 97.6) game.ReplicatedStorage.CameraKillerBox:FireClient(Player(Player.Parent)) print("First event fired") wait(8) game.ReplicatedStorage.CameraKillerBoxBack:FireClient(Player(Player.Parent)) print("Second event fired") end end
Local script - Starter Gui
local Event = game.ReplicatedStorage.CameraKillerBox local Event2 = game.ReplicatedStorage.CameraKillerBoxBack Event.OnClientEvent:Connect(function() local KillerCamera = game.Workspace.CurrentCamera local Player = game.Players.LocalPlayer repeat wait() until Player.Character KillerCamera.CameraType = "Scriptable" KillerCamera.CFrame = game.Workspace.VeryDarkBox.KillerBoxCameraSurvivors.CFrame end) Event2.OnClientEvent:Connect(function() local KillerCamera = game.Workspace.CurrentCamera local Player = game.Players.LocalPlayer repeat wait() until Player.Character KillerCamera.CameraType = "Custom" end)
When i want event to fire it doesn't work (And also if you will find any errors in local script tell me )