Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Hello! I need help with a horror game script?

I want to create a script where upon stepping on a particular part, it triggers an NPC running past the screen as a jumpscare. Can anyone help? Thanks.

1 answer

✓ Accepted answer

BaseParts have a touched event.

Part.Touched:Connect(function()

end)

From here you could make an NPC run to the player.

Part.Touched:Connect(function(part)
	local Character = part.Parent
	local Player = game.Players:GetPlayerFromCharacter(Character)

	if Player then
		NPC.Humanpoid:MoveTo(Character.HumanoidRootPart.Position)
	end
end)

You will have to modify this to fit what you are doing.

This discussion is preserved as it was. New answers, comments, and votes are closed.