When i press on the textbutton nothing happens. In output nothing is written. And in game still nothing. I have put a local script inside a textButton which is :
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.MouseButton1Click:Connect(function() local TempLoadingScreen = LoadingScreen:Clone() TempLoadingScreen.Parent = PlayerGui TeleportService:SetTeleportGui(TempLoadingScreen) TeleportService:Teleport(6958449453, player) end)
Could anyone help me?
go to game settings, security and the enable the one that have teleport and 3rd party
MouseButton1Click
to MouseButton1Down
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)