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

'local GUI6 = script.Store' Line not being recognised?

Asked by 4 years ago

I have recently got into scripting and I have got myself in a situation. I have made a line that reads "local GUI6 = script.Store" but above on another code it says its not recognised hence the blue line underneath it. Please help my asap

local Screen5 = script.Options.Frame
        local OptionButton = Screen3.OptionButton

        local PlayerGui5 = game.Players.LocalPlayer:WaitForChild("PlayerGui")
        PlayerGui5:SetTopbarTransparency(0)

        local GUI5 = script.Options
        GUI5.Parent = PlayerGui

        OptionButton.Activated:Connect(function()
            GUI5.Frame:TweenPosition(UDim2.new(0.387,0,0.365,0),"InOut","Sine",0.5) 
            GUI6.Frame:TweenPosition() ---Blue line underneath GUI6
        end)

    local Screen6 = script.Store.Frame
    local StoreButton = Screen3.StoreButton     

    local PlayerGui6 = game.Players.LocalPlayer:WaitForChild("PlayerGui")
    PlayerGui6:SetTopbarTransparency(0)

    local GUI6 = script.Store -------- Listed here
    GUI6.Parent = PlayerGui

    StoreButton.Activated:Connect(function()
        GUI6.Frame:TweenPosition(UDim2.new(0.371,0,0.173,0),"InOut","Sine",0.5)
        GUI5.Frame:TweenPosition(UDim2.new(0.387,0,1,0),"InOut","Sine",0.5)
    end)

1 answer

Log in to vote
0
Answered by
G2001H 75
4 years ago

Try this maybe work

local Screen5 = script.Options.Frame
local OptionButton = Screen5.OptionButton
local PlayerGui5 = game.Players.LocalPlayer:WaitForChild("PlayerGui")
local GUI5 = script.Options
local Screen6 = script.Store.Frame
local StoreButton = Screen6.StoreButton
local GUI6 = script.Store
local PlayerGui6 = game.Players.LocalPlayer:WaitForChild("PlayerGui")   

PlayerGui5:SetTopbarTransparency(0)
GUI5.Parent = PlayerGui5

OptionButton.Activated:Connect(function()
    GUI5.Frame:TweenPosition(UDim2.new(0.387,0,0.365,0),"InOut","Sine",0.5) 
    GUI6.Frame:TweenPosition()
end)

PlayerGui6:SetTopbarTransparency(0)
GUI6.Parent = PlayerGui6

StoreButton.Activated:Connect(function()
    GUI6.Frame:TweenPosition(UDim2.new(0.371,0,0.173,0),"InOut","Sine",0.5)
    GUI5.Frame:TweenPosition(UDim2.new(0.387,0,1,0),"InOut","Sine",0.5)
end)
Ad

Answer this question