Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can someone fix my script it seems I don't see a gui fading at all. Please help?

Asked by 4 years ago

So i made a frame gui in the StarterGUI, and i decided through one of my other guis i would clone this frame and change its background transparency. But no gui is appearing nor is a fade. I even reloaded the script and nothing happened.

Script

local playergui = game.Players.LocalPlayer.PlayerGui
local player = game.Players.LocalPlayer
local character = player.Character
local camera = workspace.CurrentCamera
local PlayerGui = player.PlayerGui
local hum = character:WaitForChild("Humanoid")






local black = script.Parent.Parent.Parent.BlackFadingGui.Frame
local playergui = game.Players.LocalPlayer.PlayerGui
script.Parent.MouseButton1Click:Connect(function(player)
    local blackclone = black:Clone()

    blackclone.Parent = playergui

for i = 0,0.1,1 do
    blackclone.BackgroundTransparency = i
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)




    local fadingclone = playergui.BlackFadingGui.Frame:Clone()
    fadingclone.Parent = playergui.BlackFadingGui








    wait(0.1)
    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)


0
looks like on line 18 you are putting the frame your cloning into the playergui instead of a screengui ForeverBrown 356 — 4y

Answer this question