I'm new to scripting and I'm making an adventure game, and i want to know how to have the player chat to the npc, then right after the screen transitions and then teleports the player.
game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = Vector3.new(CFrame.new(coordinateshere))
local debounce = false function TouchEvent(trigger) if debounce == false then if game.Players:FindFirstChild(trigger.Parent.Name) then debounce = true local tag = Instance.new("BoolValue") tag.Parent = game.Players[trigger.Parent.Name] tag.Value = true tag.Name = "NPCTALK1" end end end script.Parent.Touched:Connect(TouchEvent)
2 scripts you could use for triggering the event and teleportation.