Help with TP script

I am making a script where when you click it, it should tp you to another game. Thats covered but my function is not working. I made a function supposed to make all the GUI’s invisible, but its not working. Why?

local clicked = false
local function BeginCollectingSequence()
	local startergui = game.StarterGui
	startergui.Shop.Enabled = false
	startergui.TPMenu.Close.Visible = false
	startergui.TPMenu.Open.Visible = false
	startergui.TPMenu.MenuFrame.Visible = false
	startergui.Tutorial.Enabled = false
local TeleportService = game:GetService("TeleportService")
local GameId = 5356825192
local object = script.Parent.Parent.Parent.Blackout
object.AnchorPoint =,0)
object.Position =, 0, 0, 0)
 object.Visible = true

	object.BackgroundTransparency = 0
	object:TweenPosition(,0,0,0), Enum.EasingDirection.Out, Enum.EasingStyle.Bounce)

All help appreciated

1 Like

But my question is why is it not getting rid of the GUI’s? The tp is fine

Yes, you do need to specify the player too

But my question is why isnt the function working? Everything is fine…

I think you need to change the visible in game.Players.PlayerGui

So change local startergui = game.Players.PlayerGui

1 Like

I did some stuff and it worked, YAY

1 Like