SCRIPT THAT TELEPORTS PLAYER AND DOES TRANSITION:
local rs = game:GetService("ReplicatedStorage")
local re = rs.TaxiService
local ts = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(2,Enum.EasingStyle.Linear,Enum.EasingDirection.In,0,false,0)
local tweenInfo2 = TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.In,0,false,0)
local goal = {Transparency = 0}
local goal2 = {Transparency = 1}
re.OnServerEvent:Connect(function(plr,location)
print("Fired!")
local char = plr.Character
local hrp = char.HumanoidRootPart
local plrgui = plr.PlayerGui
local taxiServiceGui = plrgui.TaxiService
local tpPoint = game.Workspace.TaxiService:FindFirstChild(location).TaxiTPPoint
taxiServiceGui.BlackFrame.Visible = true
local tween1 = ts:Create(taxiServiceGui.BlackFrame,tweenInfo,goal)
tween1:Play()
tween1.Completed:Connect(function()
hrp.CFrame = tpPoint.CFrame
task.wait(0.5)
print("Fired!")
local tween2 = ts:Create(taxiServiceGui.BlackFrame,tweenInfo2,goal2)
tween2:Play()
tween2.Completed:Connect(function()
taxiServiceGui.BlackFrame.Visible = false
end)
end)
end)
SCRIPT THAT FIRES THE TELEPORTATION AND MAKES THE FRAME INVISIBLE:
local button = script.Parent
local location = button.Text
local rs = game:GetService("ReplicatedStorage")
local re = rs.TaxiService
local plrs = game:GetService("Players")
local plr = plrs.LocalPlayer
button.MouseButton1Click:Connect(function()
re:FireServer(location)
plr.PlayerGui.TaxiService.TaxiService.Visible = false
end)
** You are now Level 7! **