Teleport not working [v2]

Hmm, it is saying the max is 200000mb but my video is about 110000mb

1 Like

Can you explain to me in words what is happening?

So yesterday all was fine. I remade the script today (So it would tween the loading screen on) and now it is not working…

1 Like

Is the tween working? I found out you missed an argument with :TweenPosition() in your code.

The time? Well I usually do not put time and it works. I am testing now and I added ,2

1 Like

Yes, the default amount of seconds is 1. I can not understand the issue. Can you upload your video that explains the issue to gyazo?

@XDvvvDX Again, you do not need to supply optional arguments. Optional arguments are listed on the developer documentation and is not the problem OP is having trouble with.

This code should work fine for you. Make sure to put that copied place ID into the TargetPlaceId variable (line 3)

local Player = game.Players.LocalPlayer
local TeleportService = game:GetService("TeleportService")
local TargetPlaceId = -- Right click Science World in the game explorer and click Copy Place ID. Put that copied number here.
local object = script.Parent.Parent.Parent.Blackout.Frame

object.AnchorPoint = Vector2.new(0,0)
object.Position = UDim2.new(1, 0, 0, 0)
object.Visible = true



script.Parent.MouseButton1Down:Connect(function()

	game.ReplicatedStorage.OtherSounds.Click:Play()
	object.BackgroundTransparency = 0
	object:TweenPosition(UDim2.new(0,0,0,0), Enum.EasingDirection.Out, Enum.EasingStyle.Bounce)
    wait(0.5)
    TeleportService:Teleport(TargetPlaceId) -- You do not need to supply the player argument because it's being called from the client. It wouldn't make sense for your client to be able to forcibly teleport another player so the only player that makes sense is your own.
end)
1 Like

You are right. But, I could not really understand what issue he is experiencing.

Ok I will try it :smiley_cat: hope it works~

The final result is: It did not work. Lets try printing a lot and everywhere so we can see WHERE the error is.

1 Like

Its simple: It is not tweening the screen NOR tping me.

1 Like

Are you sure it is a imagebutton or textbutton?

Screen Shot 2020-08-25 at 4.02.44 pm

1 Like

Are you testing it on studio or not?

Nope. I am in the official game, not on studio.

1 Like

Can you please upload a video of what is happening in gyazo?

1 Like

What do you mean? Nothing is happening. The script will not do anything so nothing is running.

1 Like

Also make sure to send your error log here - the entire log - so we can see what’s erroring.

Assuming the LocalScript is inside of the TextButton, and that the code you posted is the only code in the script, the only line that could be erroring is your local object line. Can you send a picture of your entire hierarchy?

2 Likes

When I click it nothing is in the output.

1 Like

Did you publish your game before you tested?