So i had a question from before and I 'm trying my best to get this script fixed but nothing works :(, it almost seems hopeless, I clicked around and tried deleting some variables, nothing worked, if there are any good developers who could script could really do me a favor. Here is the script
Also if you guys are wondering what I'm trying to do here is my game link: roblox.com/games/3171457814/Fred-bear-And-Friends-Family-Diner#!/about
local player = game.Players.LocalPlayer
local character = player.Character
local camera = workspace.CurrentCamera
local hum = character:WaitForChild("Humanoid")
local StarterGui = game:GetService("StarterGui")
local black = script.Parent.Parent.Parent.BlackFadingGui.Frame
local playergui = game.Players.LocalPlayer.PlayerGui
script.Parent.MouseButton1Click:Connect(function(player)
black.Parent = StarterGui.BlackFadingGui
for i = 1,10 do
black.BackgroundTransparency = black.BackgroundTransparency + 0.3
wait(0.1)
end
repeat wait(0.1)
camera.CameraType = Enum.CameraType.Scriptable
until camera.CameraType == Enum.CameraType.Scriptable
camera.CFrame = workspace.CameraPosition2.CFrame
script.Parent.Visible = false
wait(0.1)
wait(0.01)
playergui.CharacterSelectionGui.Frame.Visible = true
end)
script.Parent.MouseEnter:Connect(function()
script.Parent.BackgroundTransparency = .5
end)
script.Parent.MouseLeave:Connect(function()
script.Parent.BackgroundTransparency = 1
end)
hum.Died:Connect(function()
script.Parent.Visible = false
wait(0.01)
script.Parent.Visible = true
wait(0.01)
script.Parent.Visible = true
end)

2 comments
Still not working
Ah, I realized the error. Fixed, you don't want to set the GUI to "StarterGui" as it is differentiated between that and "PlayerGui"