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

This works in Studio, but says "Frame is not a valid member of ScreenGui"?

Asked by 8 years ago

I have this script here, it works in studio perfectly fine.

play = script.Parent.loadingFrame.playButton
about = script.Parent.loadingFrame.aboutButton
frame = script.Parent.loadingFrame
aframe = script.Parent.aboutFrame
mB = aframe.madeBy

play.MouseEnter:connect(function()
    play:TweenSizeAndPosition(UDim2.new(0,210,0,65), UDim2.new(0,15,0,200), "In", "Quad", 1)
end)
play.MouseLeave:connect(function()
    play:TweenSizeAndPosition(UDim2.new(0,200,0,50), UDim2.new(0,15,0,200), "In", "Quad", 1)
end)

about.MouseEnter:connect(function()
    about:TweenSizeAndPosition(UDim2.new(0,210,0,65), UDim2.new(0,15,0,400), "In", "Quad", 1)
end)
about.MouseLeave:connect(function()
    about:TweenSizeAndPosition(UDim2.new(0,200,0,50), UDim2.new(0,15,0,400), "In", "Quad", 1)
end)

play.MouseButton1Down:connect(function()
    frame.Visible = false
end)
about.MouseButton1Down:connect(function()
    aframe:TweenPosition(UDim2.new(.5,-250,.5,-250), "Out", "Back", 2)
    wait(1.5)
    mB:TweenSize(UDim2.new(1,0,0,50), "Out", 1)
    mB.Text = "Made by; SimplyRekt and hurtioioio101"
end)

But in a server, it says "aboutFrame is not a valid member of ScreenGui". Hierarchy here; http://i.imgur.com/qlQ9zLF.png

1 answer

Log in to vote
0
Answered by 8 years ago

Problem

The only problem I can see is that since it works in studio and not in server it should be a latency problem, this happens because in studio everything is pretty much local so you don't have to wait for a server to create stuff so your local scripts run instantly. In server this doesn't happen as when a local scripts cause upons something in player or character that is server-sided then the local script is "local" which makes it run faster then the server can respond.

Solution

repeat wait() until game.Players.LocalPlayer.Character--To the top of every local script
0
It already has been solved, thank you for the effort, though. SimplyRekt 413 — 8y
Ad

Answer this question