What I know
I know about the PlayerGui Folder but I need to make sure the Folder stays gone unless the person Enables it.
Achieve
I’m attempting to achieve a way to enable and disable cutscenes by deleting a folder of where the Cutscenes go for just the Local Player.
The Issue
No matter what I do, it removes the Cutscenes Folder for both the entire game StarterGui and the PlayerGui.
Solutions
I’ve tried going off of who fires the Event but that tends to remove it for everyone no matter what I do.
The Script
--Made By MillerrIAm
-------------Variables------------
Event = game.ReplicatedStorage.ExtraEvents.CutsceneAllowance
------------Main Script------------
Event.OnServerEvent:Connect(function(plr,Checking)
if Checking == "True" then
local startergui = game.StarterGui
if startergui:FindFirstChild("Cutscenes") then
startergui.Cutscenes:Destroy()
plr.PlayerGui.Cutscenes:Destroy()
elseif not startergui:FindFirstChild("Cutscenes") then
local Folder1 = Instance.new("Folder")
Folder1.Name = "Cutscenes"
Folder1.Parent = startergui
local Folder2 = Instance.new("Folder")
Folder2.Name = "Cutscenes"
Folder2.Parent = plr.PlayerGui
end
end
end)
Thank you for any help you can provide.