The problem is simple. I have put a local script into a textbutton with this code
local TeleportService = game:GetService("TeleportService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local PlayerGui = Players:WaitForChild("PlayerGui")
local LoadingScreen = ReplicatedStorage:WaitForChild("Loading")
script.Parent.MouseButton1Down:Connect(function()
local TempLoadingScreen = LoadingScreen:Clone()
TempLoadingScreen.Parent = PlayerGui
TeleportService:SetTeleportGui(TempLoadingScreen)
TeleportService:Teleport(6958449453, player)
end)
When i press the textbutton in roblox studio or in game neither works. I've tried putting a print statement above the line "local TempLoadingScreen = LoadingScreen:Clone()" to see if it even initiates the function - nope. I have no idea how to fix. I have gotten reccomendations such as enable the third party teleport thing in game setting, still didnt work changing the mousebutton1down into mousebutton1click or up still doesnt work. Could someone please help me in solving this issue?
