Screengui error not showing up in output

so im trying to make a ui that pops up after you press play, but for some reason no error shows up but yet still doesnt work.

i added the waitforchild for the screen gui which fixed the other error the “screengui is not a valid member of playergui” and stopped showing up but still doesnt seem to work.

there are no other errors that show up and i need a bit of help here

thanks

game.StarterGui:WaitForChild("MenuGui").Frame.PlayButton.MouseButton1Click:Connect(function()
	script.Parent:TweenPosition(UDim2.new(0.358, 0,0.367, 0), "Out", "Back", 1)
end)

You are connecting your event to the MenuGui inside game.StarterGui. The contents of game.StarterGui are cloned to every player’s individual PlayerGui so if you want to manipulate or interact with a player’s gui you must interact with their PlayerGui folder.

Assuming this is a local script–

game.Players.LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("MenuGui").Frame.PlayButton.MouseButton1Click:Connect(function()
	script.Parent:TweenPosition(UDim2.new(0.358, 0,0.367, 0), "Out", "Back", 1)
end)

You forgot to play the tween. You need to do that.

haha that too. You (AndyVT) did forget to play the Tween. so you (KungFuPanda) should undelete your post.

Whoops, Accidently deleted it. Lol.

Here is a example of what you need to do:

script.Parent.MouseButton1Click:Connect(function()
local tween = script.Parent:TweenPosition(UDim2.new(0.358, 0,0.367, 0), "Out", "Back", 1)
tween:Play()
end)

oh yea i saw the “wait for child playergui” but i didnt know where i was supposed to put it in so i deleted it, thanks

well it works now but thanks for the note