On this page
To make a horror game on Roblox, you need three things working together: darkness (the Lighting service tuned for night, plus a flashlight), sound (ambience, 3D noises and well-timed silence) and a threat (a monster that hunts players with PathfindingService and ends in a jumpscare). This guide builds each piece in Roblox Studio with Luau you can paste in and run.
If you have never opened Studio, start with how to make a Roblox game. The steps here assume you know where Explorer and Properties are.
Set the mood with the Lighting service
Lighting does more for horror than any model. Select Lighting in Explorer and set Technology to Future in Properties. Future is the mode where lamps and flashlights cast proper shadows, and shadows are where players imagine things. Scripts can't change Technology, so set it there.
Everything else can come from a script. Lighting changes made on the server reach every player.
-- Script in ServerScriptService: night-time horror lighting
local Lighting = game:GetService("Lighting")
Lighting.ClockTime = 0 -- midnight
Lighting.Brightness = 0.5
Lighting.Ambient = Color3.fromRGB(8, 8, 12)
Lighting.OutdoorAmbient = Color3.fromRGB(20, 20, 30)
Lighting.EnvironmentDiffuseScale = 0.2
Lighting.EnvironmentSpecularScale = 0.2
Lighting.ExposureCompensation = -0.5
Lighting.GlobalShadows = true
local atmosphere = Lighting:FindFirstChildOfClass("Atmosphere") or Instance.new("Atmosphere")
atmosphere.Density = 0.45
atmosphere.Offset = 0.1
atmosphere.Color = Color3.fromRGB(40, 45, 55)
atmosphere.Decay = Color3.fromRGB(15, 15, 20)
atmosphere.Glare = 0
atmosphere.Haze = 2
atmosphere.Parent = Lighting
local grade = Lighting:FindFirstChildOfClass("ColorCorrectionEffect") or Instance.new("ColorCorrectionEffect")
grade.Saturation = -0.4
grade.Contrast = 0.15
grade.TintColor = Color3.fromRGB(205, 215, 255)
grade.Parent = LightingWhat each part does:
ClockTime0 puts the sun down.Ambientis the light in covered areas andOutdoorAmbientthe light outside. Keep both near black so a room is dark unless something lights it.- The two
Environmentscales cut the soft light the sky adds, which otherwise turns night gray. - The
Atmosphereadds haze, so long hallways fade into fog instead of ending sharply. Once an Atmosphere sits in Lighting, the oldFogStartandFogEndproperties stop applying, so tune fog here. - The
ColorCorrectionEffectdrains color and adds a cold tint.
Give players a flashlight
A flashlight turns darkness into a mechanic: players only see what they point at. This LocalScript makes an invisible part, puts a SpotLight in it and moves it to the camera every frame.
-- LocalScript in StarterPlayerScripts: a flashlight that follows the camera
local RunService = game:GetService("RunService")
local ContextActionService = game:GetService("ContextActionService")
local holder = Instance.new("Part")
holder.Size = Vector3.new(0.2, 0.2, 0.2)
holder.Transparency = 1
holder.Anchored = true
holder.CanCollide = false
holder.CanQuery = false
holder.CanTouch = false
holder.CastShadow = false
holder.Parent = workspace
local light = Instance.new("SpotLight")
light.Brightness = 3
light.Range = 60
light.Angle = 50
light.Shadows = true
light.Color = Color3.fromRGB(255, 240, 210)
light.Parent = holder
RunService:BindToRenderStep("Flashlight", Enum.RenderPriority.Camera.Value + 1, function()
holder.CFrame = workspace.CurrentCamera.CFrame
end)
local function toggle(_, inputState)
if inputState == Enum.UserInputState.Begin then
light.Enabled = not light.Enabled
end
end
ContextActionService:BindAction("Flashlight", toggle, true, Enum.KeyCode.F, Enum.KeyCode.ButtonY)
ContextActionService:SetTitle("Flashlight", "Light")BindToRenderStep with a priority just after the camera means the light moves after the camera does, so it never lags behind. A SpotLight shines out of its part's front face, which here is the way the camera looks. The true in BindAction adds an on-screen button for phone players; F and the gamepad Y button toggle it too.
The part is created by a LocalScript, so each player only sees their own beam. That is cheap and fine for most games. If teammates should see each other's flashlights, put the SpotLight inside a Tool's Handle instead, because tools replicate.
For extra tension, drain a battery while the light is on and make it flicker when the charge runs low.
Build fear with sound
A silent horror game feels empty, and sound costs far less than models. Use three layers:
- Ambience: a low drone or wind, quiet and always on.
- 3D sounds: put a Sound inside a part (a pipe, a radio), turn on
LoopedandPlaying, and setRollOffMaxDistanceto about 40. It plays from that spot and fades with distance, so a noise behind a wall sounds like it's behind the wall. - Silence: cut the ambience a few seconds before a scare. Sudden quiet tells players something is wrong.
For the silence trick, make an invisible, anchored part called ScareZone with CanCollide off across a hallway, plus a part called ScareSpeaker nearby with a Sound named Bang inside it.
-- LocalScript in StarterPlayerScripts: ambience that goes silent before a scare
local Players = game:GetService("Players")
local SoundService = game:GetService("SoundService")
local TweenService = game:GetService("TweenService")
local ambience = Instance.new("Sound")
ambience.SoundId = "rbxassetid://0" -- replace with your ambience sound id
ambience.Looped = true
ambience.Volume = 0.4
ambience.Parent = SoundService
ambience:Play()
local bang = workspace:WaitForChild("ScareSpeaker"):WaitForChild("Bang")
local used = false
workspace:WaitForChild("ScareZone").Touched:Connect(function(hit)
local character = Players.LocalPlayer.Character
if used or not character or not hit:IsDescendantOf(character) then
return
end
used = true
TweenService:Create(ambience, TweenInfo.new(2), { Volume = 0 }):Play()
task.wait(4) -- two seconds of fading, two of silence
bang:Play()
task.wait(3)
TweenService:Create(ambience, TweenInfo.new(4), { Volume = 0.4 }):Play()
end)A Sound in SoundService plays at the same volume everywhere, which suits ambience, while the Bang plays from its part. Use audio you uploaded or Creator Store audio you have permission to use; the 0 id is a placeholder. Cosmetic scares can run on the client; anything that hurts, kills or rewards a player goes through the server, like the monster next.
Make a monster that chases the nearest player
The monster is a server Script that finds the closest living player, asks PathfindingService for a route and walks it. If any of the Luau is new to you, Roblox scripting for beginners covers functions, loops and events first.
Set it up like this:
- Put a rig in Workspace (any model with a Humanoid and a HumanoidRootPart, parts unanchored, for example one from Studio's Rig Builder) and name it
Monster. - Add a RemoteEvent named
Jumpscareto ReplicatedStorage. - Add a Script inside
Monsterand paste this:
-- Script inside the Monster model in Workspace
local PathfindingService = game:GetService("PathfindingService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local monster = script.Parent
local humanoid = monster:WaitForChild("Humanoid")
local root = monster:WaitForChild("HumanoidRootPart")
local jumpscare = ReplicatedStorage:WaitForChild("Jumpscare")
local DETECT_RANGE = 150 -- studs
local CATCH_RANGE = 5
local REPATH_TIME = 0.5 -- seconds between path updates
root:SetNetworkOwner(nil)
local path = PathfindingService:CreatePath({ AgentRadius = 2, AgentHeight = 5, AgentCanJump = true })
local waypoints, nextIndex = {}, 0
local function findNearestPlayer()
local best, bestRoot, bestHum, bestDistance = nil, nil, nil, DETECT_RANGE
for _, player in Players:GetPlayers() do
local character = player.Character
local hrp = character and character:FindFirstChild("HumanoidRootPart")
local hum = character and character:FindFirstChildOfClass("Humanoid")
if hrp and hum and hum.Health > 0 then
local distance = (hrp.Position - root.Position).Magnitude
if distance < bestDistance then
best, bestRoot, bestHum, bestDistance = player, hrp, hum, distance
end
end
end
return best, bestRoot, bestHum, bestDistance
end
humanoid.MoveToFinished:Connect(function(reached)
if reached and nextIndex > 0 and nextIndex < #waypoints then
nextIndex += 1
if waypoints[nextIndex].Action == Enum.PathWaypointAction.Jump then
humanoid.Jump = true
end
humanoid:MoveTo(waypoints[nextIndex].Position)
end
end)
local function chase(goal)
local ok = pcall(function()
path:ComputeAsync(root.Position, goal)
end)
if ok and path.Status == Enum.PathStatus.Success then
waypoints = path:GetWaypoints()
nextIndex = math.min(2, #waypoints)
humanoid:MoveTo(waypoints[nextIndex].Position)
else
waypoints, nextIndex = {}, 0
humanoid:MoveTo(goal) -- no path found: walk straight at them
end
endThen add the loop at the bottom of the same Script:
-- Same Script, at the bottom: catch players in reach, chase everyone else
local function step()
local player, hrp, hum, distance = findNearestPlayer()
if not player then
return
elseif distance > CATCH_RANGE then
chase(hrp.Position)
elseif not hum:GetAttribute("Caught") then
hum:SetAttribute("Caught", true)
jumpscare:FireClient(player)
task.delay(1, function()
hum.Health = 0
end)
end
end
while true do
step()
task.wait(REPATH_TIME)
endHow it works:
- Players move, so the path is recomputed every half second, and
MoveToFinishedsteps through the waypoints in between. Waypoint 1 is the monster's own spot, so it starts at 2. ComputeAsynccan fail, so it runs in apcallwith a straight walk as the fallback.SetNetworkOwner(nil)keeps the monster's physics on the server, so it doesn't stutter when it gets close to a player.- The
Caughtattribute sits on the Humanoid, so each life is caught only once.
For a big monster, raise AgentRadius and AgentHeight so it stops trying gaps it can't fit through.
Add a jumpscare
The server already fires Jumpscare to the caught player, so the client only has to show it. In StarterGui, add a ScreenGui named JumpscareGui holding an ImageLabel named Scare (BackgroundTransparency 1, ScaleType Crop, Image set to an image you uploaded) and a Sound named Scream. Add this LocalScript to the ScreenGui:
-- LocalScript inside StarterGui > JumpscareGui
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")
local gui = script.Parent
local scare = gui:WaitForChild("Scare")
local scream = gui:WaitForChild("Scream")
local jumpscare = ReplicatedStorage:WaitForChild("Jumpscare")
gui.IgnoreGuiInset = true -- cover the top bar too
scare.AnchorPoint = Vector2.new(0.5, 0.5)
scare.Position = UDim2.fromScale(0.5, 0.5)
scare.Visible = false
jumpscare.OnClientEvent:Connect(function()
scare.Size = UDim2.fromScale(0.4, 0.4)
scare.ImageTransparency = 0
scare.Visible = true
scream:Play()
-- the face rushes at the camera, holds, then fades
TweenService:Create(scare, TweenInfo.new(0.12), { Size = UDim2.fromScale(1.2, 1.2) }):Play()
task.wait(1.3)
local fade = TweenService:Create(scare, TweenInfo.new(0.5), { ImageTransparency = 1 })
fade:Play()
fade.Completed:Wait()
scare.Visible = false
end)The image fills the screen in about a tenth of a second, which reads as a lunge. The server decides who is caught and tells only that player; never let a client fire an event like "damage me" that the server trusts without checking.
Make it move only when nobody is looking
A statue monster freezes while anyone can see it and rushes in when everyone looks away. The exact answer lives in each player's camera, but anything a client reports can be faked: an exploiter could claim to stare forever and freeze the monster for the whole server. So the server approximates it with what it already knows: the way each character faces, plus a raycast for walls.
Add this to the monster Script, replacing the old while loop:
-- Same Script: freeze while watched; this loop replaces the old while loop
local VIEW_DOT = 0.5 -- a cone of about 120 degrees in front of the character
local VIEW_RANGE = 80
local function isBeingWatched()
for _, player in Players:GetPlayers() do
local character = player.Character
local head = character and character:FindFirstChild("Head")
local hrp = character and character:FindFirstChild("HumanoidRootPart")
local hum = character and character:FindFirstChildOfClass("Humanoid")
if head and hrp and hum and hum.Health > 0 then
local toMonster = root.Position - head.Position
local facing = hrp.CFrame.LookVector:Dot(toMonster.Unit)
if toMonster.Magnitude < VIEW_RANGE and facing > VIEW_DOT then
local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Exclude
params.FilterDescendantsInstances = { character, monster }
if not workspace:Raycast(head.Position, toMonster, params) then
return true -- clear line from their eyes to the monster
end
end
end
end
return false
end
local lastPath = 0
while true do
if isBeingWatched() then
humanoid.WalkSpeed = 0 -- frozen like a statue
else
humanoid.WalkSpeed = 30
if os.clock() - lastPath >= REPATH_TIME then
lastPath = os.clock()
step()
end
end
task.wait(0.1)
endThe dot product compares the character's facing with the direction to the monster: 1 is dead ahead, 0 is to the side. The raycast stops walls from counting as a look.
It works best in first person: select StarterPlayer and set CameraMode to LockFirstPerson in Properties. The character then turns with the camera, so its facing is close to where the player looks.
Pace the scares
Horror is rhythm. Players need quiet stretches to get nervous in, or every scare blends into noise.
- Start calm. Hold the monster back for the first minute or two so players learn the map.
- Fake out first. A creak with nothing behind it makes the real threat worse.
- Space the big scares. One every few minutes beats a small one every 30 seconds.
- Give players a goal. Keys, fuses or an exit push them into dark rooms on their own.
- Leave a safe room. Somewhere the monster can't reach gives players a breather.
- Test with headphones and low graphics. Low-end devices fall back to simpler lighting, so check the game still reads.
Still need a setting? Pick one of these Roblox game ideas and give it a horror twist.
Questions
How do you make a Roblox game scary?
Make it dark but readable with Future lighting, fog and a few weak lights, then let sound do the work: quiet ambience, noises from the walls and silence right before something happens. Keep the threat rare. A monster players hear long before they see it is scarier than one that is always on screen.
How do I make a jumpscare in Roblox Studio?
Put a RemoteEvent in ReplicatedStorage. When the server decides a player is caught, it fires the event to that player, and a LocalScript in a ScreenGui shows a full-screen ImageLabel and plays a loud sound for a second or two. The server decides when it happens; the client only displays it.
How do you make a monster chase players in Roblox?
Use PathfindingService on the server. Every half second, find the nearest living player, compute a path to them and walk the waypoints with Humanoid:MoveTo. Call SetNetworkOwner(nil) on the monster's HumanoidRootPart so the server keeps control of its physics.
What lighting settings are best for a Roblox horror game?
Set Lighting.Technology to Future in Properties, ClockTime to 0, and keep Ambient and OutdoorAmbient close to black. Add an Atmosphere for haze and a ColorCorrectionEffect with low saturation. Then place a few dim, warm lights so players can still see shapes.
Can I make a horror game on Roblox without scripting?
You can set up lighting, fog and placed sounds entirely in Properties. The monster, the flashlight and the jumpscare need scripts, so paste the ones from this guide or describe the game to an AI builder such as Revix and let it write them.








