- What do you want to achieve? Keep it simple and clear!
I am attempting to edit my Gui script so that when my Stats Gui tweens on screen the Scouter Gui tweens off screen if it is currently on screen. I’ve already done this with my Scouter Gui so that when it tweens on screen the Stats Gui tweens off screen if it is currently on screen.
- What is the issue? Include screenshots / videos if possible!
The ScouterGui is not being recognized as a valid member of PlayerGui despite the same thing being done in a script for the ScouterGui.


- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Analyzing the output.
Stats Gui Movement Script:
--
local StatsButton = script.Parent.TextButton
local StatsFrame = script.Parent.StatFrame
local OrangeFrame = script.Parent.Orange
local LightOrangeFrame = script.Parent.LightOrange
local StatLabel = script.Parent.StatLabel
local ScouterFrame = script.Parent.Parent.ScouterGui.ScouterFrame
StatsButton.MouseButton1Up:Connect(function()
if StatsFrame.Position == UDim2.new(0.746,0,0.519,0)
then
StatsFrame:TweenPosition(UDim2.new(1,0,0.519,0),"InOut","Quint",1,false)
elseif StatsFrame.Position == UDim2.new(1,0,0.519,0)
then
StatsFrame:TweenPosition(UDim2.new(0.746,0,0.519,0),"InOut","Quint",1,true)
end
if OrangeFrame.Position == UDim2.new(0.746,0,0.489,0)
then
OrangeFrame:TweenPosition(UDim2.new(1,0,0.489,0),"InOut","Quint",1,false)
elseif OrangeFrame.Position == UDim2.new(1,0,0.489,0)
then
OrangeFrame:TweenPosition(UDim2.new(0.746,0,0.489,0),"InOut","Quint",1,true)
end
if LightOrangeFrame.Position == UDim2.new(0.746,0,0.489,0)
then
LightOrangeFrame:TweenPosition(UDim2.new(1,0,0.489,0),"InOut","Quint",1,false)
elseif LightOrangeFrame.Position == UDim2.new(1,0,0.489,0)
then
LightOrangeFrame:TweenPosition(UDim2.new(0.746,0,0.489,0),"InOut","Quint",1,true)
end
if StatLabel.Position == UDim2.new(0.79,0,0.501,0)
then
StatLabel:TweenPosition(UDim2.new(1,0,0.501,0),"InOut","Quint",1,false)
elseif StatLabel.Position == UDim2.new(1,0,0.501,0)
then
StatLabel:TweenPosition(UDim2.new(0.79,0,0.501,0),"InOut","Quint",1,true)
end
if ScouterFrame.Position == UDim2.new(0.717,0,0.515,0)
then
ScouterFrame:TweenPosition(UDim2.new(1,0,0.515,0),"InOut","Quint",1,false)
end
end)
Scouter Gui movement script (Working):
--
local ScouterButton = script.Parent.TextButton
local ScouterFrame = script.Parent.ScouterFrame
local LightOrange = script.Parent.Parent.StatsGui.LightOrange
local Orange = script.Parent.Parent.StatsGui.Orange
local StatFrame = script.Parent.Parent.StatsGui.StatFrame
local StatLabel = script.Parent.Parent.StatsGui.StatLabel
ScouterButton.MouseButton1Up:Connect(function()
if ScouterFrame.Position == UDim2.new(0.717,0,0.515,0)
then
ScouterFrame:TweenPosition(UDim2.new(1,0,0.515,0),"InOut","Quint",1,false)
elseif ScouterFrame.Position == UDim2.new(1,0,0.515,0)
then
ScouterFrame:TweenPosition(UDim2.new(0.717,0,0.515,0),"InOut","Quint",1,true)
end
if LightOrange.Position == UDim2.new(0.746,0,0.489,0)
then
LightOrange:TweenPosition(UDim2.new(1,0,0.489,0),"InOut","Quint",1,false)
end
if Orange.Position == UDim2.new(0.746,0,0.489,0)
then
Orange:TweenPosition(UDim2.new(1,0,0.489,0),"InOut","Quint",1,false)
end
if StatFrame.Position == UDim2.new(0.746,0,0.519,0)
then
StatFrame:TweenPosition(UDim2.new(1,0,0.519,0),"InOut","Quint",1,false)
end
if StatLabel.Position == UDim2.new(0.79,0,0.501,0)
then
StatLabel:TweenPosition(UDim2.new(1,0,0.501,0),"InOut","Quint",1,false)
end
end)
Many thanks,
Sephorothy