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.
✓ ANSWER ACCEPTED
How do i make a player teleport right after an NPC chat is over?
1 answer
✓ Accepted answer
- first
game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = Vector3.new(CFrame.new(coordinateshere))
- second
- put this in a no-collide invisible brick
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.
- bool value name is NPCTALK1 so make a check for that when you need to assure the event has passed in the game (helps vs exploiters)
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
you mean you want someone to make an NPC chat script then a camera script for 'transitions' and then make the player change CFrame? (tp)
Yes, basically..
game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = Vector3.new(CFrame.new(coordinateshere)) should work for TP, as for the rest, you can use the camera position and a gui with a brick touch (which has debounce and values to set the next objective of your game)
Thank you!!