How can I make a custom teleport animation?

I’m trying to work on a teleport for a game I’m working on and I don’t know where to start on making it work and how to make it work.

image
image
I’m trying to make it so when the player interacts with the proximity prompt, a cutscene will play on the player’s screen of them climbing down the hatch and when the player is out of view, the screen will fade to black and they get teleported to the sub-game.

I don’t really know what to look for so I’m asking for help here. For now, I make it so when the player activates the proximity prompt, it makes a climbing noise and they get teleported to the sub-game. (Side issue: I don’t know how to make the climbing noise only be heard in the player’s client.)

local interaction = script.Parent.ProximityPrompt

interaction.Triggered:Connect(function(plr)
	local TeleportService = game:GetService("TeleportService")
	local Place = 8750059431
	
	script.Parent.LadderClimb:Play()
	TeleportService:Teleport(Place, plr)

end)
2 Likes

Note: I have absolutely no idea what i’m doing since I’m very new to this. Please if you’re gonna explain, explain it as if you’re explaining it to someone who barely knows scripting. (Srry ;-; )

If you want to make the climbing noise to be heard only for the client, you will need to play the sound with local script. (thus you will need to use Remote Events)

I’ll try to give you somehow a walkthrough:

  1. Make a RemoteEvent inside ReplicatedStorage

  2. Make a localscript inside StarterPlayerScripts

  3. Move the sound to ReplicatedStorage

  4. Make code for localscript, the localscript code could look like this:

game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function()
	-- game.ReplicatedStorage.Sound:Play()
end)
  1. Now, everytime player triggers the interaction, you want to trigger the RemoteEvent so localscript can execute the code you told him to do. Using: game.ReplicatedStorage.RemoteEvent:FireClient(plr) in your script

  2. Tada, it should work! :smiley:

Hope that helps!

2 Likes

Oh my gosh you just made me understand how to use remote events
Thank you so much for your help on that issue! :smiley:
Thanks to you, now I can understand people slightly better when they talk about remote events!