Hey guys,
I was just working on a boss battle that teleports you to another game when you touch a secret door. But the problem is, the touched event needs to be in a serverscript and the teleportservice needs to be in a localscript. What do I do?
Here is my code:
local teleportservice = game:GetService("TeleportService")
script.Parent.Touched:Connect(function()
teleportservice:Teleport(5190764174)
end)
Thanks.

1 comment
Remote Events. Here's the article: https://developer.roblox.com/en-us/articles/Remote-Functions-and-Events