Lesson 7 of 11
Game feel: juice, hit stop and feedback
Give Beacon Yard's wrench real weight: server-confirmed hit feedback, 60 ms local hit stop, damped camera shake gated by ReducedMotion, floating damage numbers and layered clangs.
By the end you can
- Break a melee action into anticipation, server-confirmed impact and recovery beats
- Fire hit stop, damped camera shake, damage numbers and layered audio once per confirmed hit and never on a rejected swing
- Gate camera shake and hit stop on Accessibility.reducedMotion() while keeping crisp hit confirmation
- Layer impact audio with pitch variation and compare hand-rolled shake against RbxUtil Shake
Before this: The wrench: tools, raycasts, tags, Animation: the Animation Editor, Moon Animator, Animator, Audio: recording, editing, licensing, the audio graph, VFX: particles, beams, trails, lighting effects
1Why Beacon Yard's wrench still feels light
Open CombatService.luau at m14-ship and trace what the server sends back when you swing the wrench:
local now = workspace:GetServerTimeNow()
local previousSwing = lastSwing[player]
if previousSwing ~= nil and now - previousSwing < SWING_GAP then
return "rejected"
end
lastSwing[player] = now
feedback(player, "swing", nil)
local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Include
local targets = CollectionService:GetTagged(DRONE_TAG)
for _, crawler in CollectionService:GetTagged(CRAWLER_TAG) do
table.insert(targets, crawler)
end
params.FilterDescendantsInstances = targets
local result = workspace:Raycast(origin, direction.Unit * Config.WRENCH_RANGE, params)
local tag = if result then targetTag(result.Instance) else nil
if result == nil or tag == nil then
return "miss"
end
feedback(player, "hit", nil)
Look closely at what happens across the client files today:
CombatClient.luauplaysVfxClient.burst(handle.Position, "impact")on the animation'sImpactmarker (or afterSWING_IMPACT_FALLBACK_SECONDS = 0.12) on every swing, even a miss or a swing rejected bySWING_GAP = 0.4.CombatServicesends onlyfeedback(player, "hit", nil)with no hit ID, no damage number, no target kind (DronevsCrawler) and no hit position.VfxClientfalls back todronePosition()even when you hit a crawler, and neitherCameraClientnorCombatClientreacts to confirmed hits at all.
At m14-ship, why can a player swinging at a scrap crawler see sparks burst at the drone instead of the crawler?
Answer
CombatService sends Feedback("hit") with no position, and VfxClient.start always looks up dronePosition() first on "hit". Passing hit position, damage and target kind on the server's confirmed hit message lets every client effect anchor to the exact point of impact.
Open this step in lesson mode · Link to this step · This confused me
2Anticipation, impact, recovery
| In the picture | In Roblox |
|---|---|
| Raising the stick | Anticipation: local swing animation and whoosh before the Impact marker |
| Striking the skin | Impact: server-confirmed hit stop, damage number, sparks, layered clang and damped camera shake |
| The cymbal decaying | Recovery: SWING_GAP cooldown, camera spring settling and drone stun highlight |
Every punchy action has three beats, just like a drum hit: anticipation (raising the stick), impact (striking the skin) and recovery (the cymbal ringing out).
Think of it as A drum hit: raising the stick, striking the skin, letting the cymbal ring
Beacon Yard's timings already map to the three beats (Config.luau and CombatService.luau):
- Anticipation (
0to0.20 s): plays locally the instant you press swing. The swing animation starts (or, with no animation id, the proceduralSwingArc: wind-upSWING_PROCEDURAL_WINDUP = 0.08, strikeSWING_PROCEDURAL_STRIKE = 0.12), a trail follows the wrench and a light whoosh plays. A swing on its own makes no sparks, so a miss reads as a miss. - Impact (server-confirmed): hit confirmHit confirmFeedback that fires only after the server confirms a strike connected, separating real hits from whiffs and rejected swings.Think of it as the referee's bell ringing only when the blow actually scored. arrives from
CombatService. Sparks burst at the HitConfirm position, the damage pops up there, a layered clang sounds, the camera shakes briefly and hit stopHit stopA brief pause of a few frames (often 40 to 80 ms) on a confirmed impact that gives a strike physical weight.Think of it as the split-second crunch when a heavy wrench meets solid metal. pauses the swing for0.06 s. - Recovery (
0.20to0.40 s): the wrench returns (SWING_PROCEDURAL_RETURN = 0.15), the server's swing gap (local SWING_GAP = 0.4inCombatService.luau) runs out and the camera settles back to rest. The drone's white stun outline lastsSTUN_SECONDS = 1.6fromConfig.luau, well past the next swing.
Put the events of one server-confirmed wrench hit in chronological order.
Answer
1. Client starts the wrench swing animation and sends Swing:FireServer(origin, direction) 2. Server validates SWING_GAP and raycasts against Drone and Crawler tags 3. Server applies the wrench's damage and fires HitConfirm with hitId, position, damage and target 4. Client runs 60 ms local hit stop, spawns -34 damage text, plays layered clang and starts damped shake 5. Camera settles to zero offset and SWING_GAP (0.4 s) finishes for the next swing. Splitting immediate local anticipation from server-confirmed impact gives responsive controls without ever faking a hit that missed.
Open this step in lesson mode · Link to this step · This confused me
3Hit confirm: never fake a confirmed hit
Client sideRemember: Anticipation, impact and recovery in combat feel is a drum hit: raising the stick, striking the skin, letting the cymbal ring.
Why not fire hit stop and damage numbers straight from a client-side raycast so they happen zero milliseconds after clicking? Since m15-scale the server rewinds the drone to where your client saw it, so lag alone no longer causes misses. The server can still reject a swing (cooldown, range, an origin far from your head), and on a 150 ms connection its answer arrives after the 0.12 s contact frame. Showing -34 on a swing the server then rejects tells the player a number that was never true. Beacon Yard waits for the confirm; the Alternatives below show the trade-off many action games make instead.
Answer the question below after checking where the drum-kit analogy breaks over a network.
Where does it break?“A drum hit: raising the stick, striking the skin, letting the cymbal ring” is a good picture of anticipation, impact and recovery in combat feel. Where does it stop being true?
It breaks here. A real drummer always hits the drum in front of them; over a network, the client starts the swing immediately, while the server decides milliseconds later whether the raycast actually hit, so impact juice must wait for server confirmation.
The true model. Combat feel splits local anticipation from server-confirmed impact. Every impact effect triggers once per confirmed hit id, never on a miss or rejected request, and suppresses camera shake and hit stop whenever Accessibility.reducedMotion() is true.
Every confirmed hit from CombatService should carry an incrementing hitId. The client keeps a tiny seen set (or ring buffer) so each hitId fires impact feedback at most once, and miss or rejected outcomes trigger zero impact juice.
Four replies reach this cell: a rejected swing, a miss and the same hit twice. Predict confirmed and silent before you press Run. Then give the last reply hitId = 4 and run it again: a second real hit should count.
local seen = {}
local confirmed, silent = 0, 0
local function handle(reply)
if reply.outcome ~= "hit" or reply.damage <= 0 or seen[reply.hitId] then
silent += 1
return
end
seen[reply.hitId] = true
confirmed += 1
end
handle({ outcome = "rejected", hitId = 1, damage = 34 })
handle({ outcome = "miss", hitId = 2, damage = 0 })
handle({ outcome = "hit", hitId = 3, damage = 34 })
handle({ outcome = "hit", hitId = 3, damage = 34 }) -- duplicate
print(string.format("confirmed=%d silent=%d", confirmed, silent))
confirmed=1 silent=3A player swings at t = 1.00 s (hits Drone) and swings again at t = 1.25 s. SWING_GAP in CombatService.luau is 0.4 seconds. What does this print?
local SWING_GAP = 0.4
local lastSwing = 1.00
local now = 1.25
local accepted = (now - lastSwing) >= SWING_GAP
local outcome = if accepted then "hit" else "rejected"
print(accepted, outcome)
Answer
false rejected. Because the second swing is rejected inside SWING_GAP, CombatClient must fire zero hit stop, zero shake and zero damage text for it.
Open this step in lesson mode · Link to this step · This confused me
4Hit stop, camera shake and reduced motion
Hit stop gives a 34-damage wrench swing real weight, yet one mistake breaks multiplayer: never pause the server or yield RunService.Heartbeat. Start a 0.06 s (60 ms) hit stop on the attacking client. With an authored swing animation, call track:AdjustSpeed(0) on the local AnimationTrack, then task.delay(0.06, function() track:AdjustSpeed(1) end). With no animation id (Ids.WRENCH_SWING_ANIMATION = 0), Beacon Yard swings the wrench procedurally through SwingArc on its own clock, and the hit stop pauses that clock instead. Either way, for those 60 ms the drone stays where it is drawn (DroneClient.holdFor) and the target flashes white, so the whole contact freezes, not just the arm. The pause never touches the server. The character's Animator replicates its tracks to other clients1, so with a real swing animation other players see your swing, and may see the same short freeze, with no extra code.
The procedural arc is different. It turns Tool.Grip on your client, and a Grip change made on one client stays on that client. So since m16-design-pass the server relays the swing: after CombatService accepts a swing, hit or miss, it fires SwingSeen(swinger) to every other player (SwingRelay.recipients is everyone except the swinger):
function SwingRelay.recipients<T>(players: { T }, swinger: T): { T }
local others: { T } = {}
for _, player in players do
if player ~= swinger then
table.insert(others, player)
end
end
return others
Each viewer's CombatClient.swingSeen plays the same arc on the swinger's wrench with CombatClient.playSeen, sized by the viewer's own Reduced motion setting, with no trail and no sparks. Sparks stay on the swinger's own HitConfirm. The relay only runs while the animation id is 0, and it rides on swings the Swing rate limit already accepted, so it cannot flood clients. SwingSeen is also a server-only remote: a client that fires it earns a honeypot strike. The playtests swing_relay and swing_seen_arc cover both halves.
With the animation id at 0, why does Beacon Yard relay each swing through SwingSeen instead of letting the Grip change replicate?
Answer
A Tool.Grip change made on one client stays on that client, so the server tells the other clients and each plays the arc itself. A client change stays on that client. The server, which already accepted the swing, is the one place that can tell everyone else.
Camera shake follows the same client-only rule: a small damped offset on RenderStepped. Beacon Yard nudges the local Humanoid.CameraOffset2 instead of writing workspace.CurrentCamera.CFrame, so the default camera scripts keep control and the offset resets to zero when the shake ends. Beacon Yard already checks player motion preferences in Accessibility.luau (seeded from GuiService.ReducedMotionEnabled3, the setting Roblox's accessibility guide asks you to respect4) and respects them in CameraClient.luau:
function Accessibility.reducedMotion(): boolean
return flag("ReducedMotion")
end
function Accessibility.largeText(): boolean
return flag("LargeText")
local function tweenFieldOfView(camera: Camera, fieldOfView: number)
if activeTween ~= nil then
activeTween:Cancel()
activeTween = nil
end
if Accessibility.reducedMotion() then
camera.FieldOfView = fieldOfView
return
end
local tween = TweenService:Create(camera, FOV_TWEEN, { FieldOfView = fieldOfView })
activeTween = tween
tween:Play()
When Accessibility.reducedMotion() is true, drop camera shake amplitude and hit stop to 0. Keep the floating -34 damage number, the reduced spark burst (VFX_REDUCED_SHARE = 0.3) and the layered clang so players who disable motion still get unmistakable hit confirmation.
This cell compares damped shake amplitudes (amp * exp(-decay * t)) with ReducedMotion off and on. Before you press Run, predict how much of the starting 0.45 is left after 0.1 s with DECAY = 18: about half, or about a sixth? Then halve DECAY and see how much longer the shake lingers.
local DECAY = 18
local function shakeEnvelope(amp, t, reducedMotion)
if reducedMotion or amp <= 0 or t < 0 then
return 0
end
return amp * math.exp(-DECAY * t)
end
print(string.format(
"t=0.00: %.3f (reduced %.3f) | t=0.10: %.3f (reduced %.3f)",
shakeEnvelope(0.45, 0.00, false),
shakeEnvelope(0.45, 0.00, true),
shakeEnvelope(0.45, 0.10, false),
shakeEnvelope(0.45, 0.10, true)
))
t=0.00: 0.450 (reduced 0.000) | t=0.10: 0.074 (reduced 0.000)In Juiced mode, swing at 0 ms and 120 ms to feel what the ends of the Hit stop slider do. Try 60 ms next, then turn on Reduced motion and swing again. Watch the Damage popup and listen for the Layered clang when shake and hit stop disappear. The next step shows how those two layers work.
The hit feel bench

Why must Beacon Yard's 60 ms hit stop pause only the attacker's local AnimationTrack instead of pausing DroneService on the server?
Answer
Pausing the server freezes movement and timers for every player in the yard, whereas pausing the local track feels crisp only to the attacker. Local track pause gives tactile punch without desyncing timers or hitching teammates in the same server.
Open this step in lesson mode · Link to this step · This confused me
5Damage numbers and layered audio
Two cheap client additions multiply combat clarity without clutter:
- Floating damage numbers: a small
BillboardGuithat starts at the confirmed hit position showing-34in crisp bold text, rising 2 studs over0.7 sand fading out (cleaned up when it finishes, or returned to a small pool). Even with sound muted or ReducedMotion on, the player knows the hit connected and exactly how much damage it dealt. - Layered impact sound: one flat clip sounds thin after ten swings. Beacon Yard's
SoundClient.luaualready jittersPlaybackSpeedusingConfig.SFX_PITCH_SPREAD = 0.08:
local function playFlat(spec: SoundSpec, kind: FeedbackKind, group: SoundGroup, spread: number)
local sound = Instance.new("Sound")
sound.Name = kind
sound.SoundId = spec.file
sound.Volume = spec.volume
sound.PlaybackSpeed = spec.pitch * (1 + random:NextNumber(-spread, spread))
sound.SoundGroup = group
sound.Looped = false
sound.Parent = SoundService
sound.Ended:Once(function()
sound:Destroy()
end)
sound:Play()
Layer two complementary clips on a confirmed hit: a short high metallic transient (the wrench contact) plus a slightly lower body thump (heavier on Drone, snappier on Crawler), each jittered within SFX_PITCH_SPREAD. Roblox's audio guide now recommends modular AudioPlayer and Wire graphs over legacy Sound objects for new audio work5, and the same layering and pitch-spread pattern applies to both.

Select a numbered pin, or a row below, to read what it marks.
A server-confirmed wrench hit: floating -34 damage text, contact sparks and white stun flash firing together on impact.
Which techniques keep Beacon Yard's wrench hits crisp without causing ear fatigue over a 10-minute session?
Answer
Jitter each layer's playback speed by a small spread such as Config.SFX_PITCH_SPREAD (0.08); Layer a bright transient contact sound with a heavier low-end body thump on confirmed hits; Keep the miss swing sound light and airy so confirmed hits contrast clearly against whiffs. Pitch spread breaks mechanical repetition, layering adds physical weight, and contrasting whoosh vs clang makes hits readable by ear alone.
Open this step in lesson mode · Link to this step · This confused me
6Build it: wire hit confirm, hit stop, shake and numbers
Upgrade Beacon Yard's combat loop for m16-design-pass so server hits carry the data client feel needs, while Accessibility.reducedMotion() stays respected everywhere.
Build along
src/shared/FeelRules.luausrc/server/Remotes.luausrc/server/CombatService.luausrc/client/CombatClient.luausrc/shared/SwingArc.luausrc/shared/SwingRelay.luausrc/client/VfxClient.luausrc/client/DroneClient.luausrc/client/CameraClient.luausrc/client/SoundClient.luausrc/shared/Config.luau
Add
src/shared/FeelRules.luau, the finished version of this lesson's level 3 challenge. There is no separate feel module on the client:CombatClient,CameraClientandSoundClienteach play their part of the plan.You should see FeelRules.luau exports newTracker, planHitFeedback, shakeEnvelope and jitterPitch as pure functions, with DEFAULT_HITSTOP_SECONDS = 0.06 and SHAKE_DECAY = 18.
Add
"HitConfirm"to the remote names inRemotes.luau. Insrc/server/CombatService.luau, keep a per-playerhitIdscounter (cleared with the player's scope), makedroneHitalso return the drone's rewound position, and callconfirmHit(player, hitPosition, "Drone" or "Crawler")after a hit. It never fires on"miss"or"rejected". The payload's damage is the damage the server actually dealt,UpgradeService.wrenchDamage(player), so an upgraded wrench pops-54or-74, never a number that was not true.You should see CombatService fires the HitConfirm remote with an incrementing id, the hit position, the damage and the target tag only when a swing hits.
Add
src/shared/SwingArc.luau, the wind-up, strike and return of a procedural swing (SWING_PROCEDURAL_*inConfig.luau, 70 degrees, or 18 under reduced motion). Insrc/client/CombatClient.luau, play the animation when the id is set and the arc when it is 0, with a trail on the wrench handle for the swing's length and no spark. ConnectCombatClient.confirmtoHitConfirm, build the plan withFeelRules.planHitFeedback(tracker, result, Accessibility.reducedMotion())(the tracker drops a repeated id), then callVfxClient.burst(position, "hit"), run the hit stop withDroneClient.holdFor(0.06)and a white flash, callCameraClient.shake(plan.shakeAmplitude)and spawn the popup. Delete the"hit"branch inVfxClient.startthat guessed a position from the first drone; the confirm path owns hit sparks now.You should see A swing shows a trail and no sparks. Landing a hit bursts sparks at the hit position, pauses the swing for 60 ms (the AnimationTrack, or the procedural arc when the animation id is 0), holds the drone where it is drawn, flashes the target white, and spawns the real damage as a BillboardGui that rises 2 studs over 0.7 s. Under ReducedMotion there is no pause and the arc shrinks from 70 to 18 degrees.
Add
"SwingSeen"to the remote names inRemotes.luauand toRemoteGuard.SERVER_ONLY. Addsrc/shared/SwingRelay.luauwithneeded(animationAsset)(true when there is no swing animation) andrecipients(players, swinger)(everyone except the swinger). InCombatService, after a swing is accepted, fireSwingSeen(swinger)to each recipient when a relay is needed. InCombatClient, connectSwingSeentoswingSeen, which drops anything that is not another player and callsplaySeen(character)to run the arc on that player's Wrench with this viewer's Reduced motion setting.You should see In Server & Clients with two players and the animation id at 0, each player sees the other's wrench swing through the arc, with no trail and no sparks. The playtests swing_relay and swing_seen_arc pass.
Add
CameraClient.shake(amplitude)insrc/client/CameraClient.luau. It sets a randomHumanoid.CameraOffsetscaled byFeelRules.shakeEnvelopeonRenderStepped, reads the reduced motion setting every frame, and resets the offset to zero when done.You should see CameraClient applies a damped micro-shake (0.45 amplitude on Drone, 0.3 on Crawler) for at most 0.35 s, and stops at once when ReducedMotion is turned on.
Add a
clangentry toConfig.SOUNDS. Insrc/client/SoundClient.luau, play it after"hit"and compute every pitch withFeelRules.jitterPitch, while"swing"keeps its light whoosh.You should see SoundClient plays the hit thump and a metal clang on top for every confirmed hit, each with its own pitch jitter from Config.SFX_PITCH_SPREAD.
Other ways pros do this
| Option | What it is | When pros pick it | Trade-offs |
|---|---|---|---|
| Predicted cosmetic impact, confirmed numbers | Local sparks and hit stop on a client-side overlap; the -34 and the damage only on HitConfirm. | Fast melee where a hit stop one round trip late reads as a hitch, especially at high ping. | Snappier at 150 ms and above; a rare false spark on a swing the server rejects. |
| Hand-rolled damped shake + AdjustSpeed(0) (Beacon Yard) | 25 lines of exponential decay in CameraClient plus a 60 ms local track pause. | You want zero dependencies, deterministic unit tests and one place to gate on Accessibility.reducedMotion(). | Limited to simple impulse shakes; complex trauma blending takes extra code. |
| RbxUtil Shake (Sleitnick/RbxUtil) | MIT-licensed camera shake module (maintained, active as of 2026-11-25) with fade-in, fade-out, frequency and positional/rotational influence. | Action games with many overlapping explosions, dashes and recoil profiles. | Extra Wally dependency; you still wrap it with Accessibility.reducedMotion() yourself. |
| Server-driven camera or part tweens for hit juice | Server scripts calling TweenService on world parts for hit recoil. | Avoid for combat feel. | Adds latency, burns replication bandwidth and cannot respect each player's ReducedMotion setting. |
A player enables ReducedMotion in Beacon Yard's Settings menu and lands a wrench hit on the drone. What should they experience?
Answer
Zero camera shake and zero hit stop, while the -34 damage number, reduced spark burst, stun flash and layered clang still confirm the hit. Good accessibility strips motion discomfort without stripping gameplay information: text, color contrast and audio still confirm every hit.
Open this step in lesson mode · Link to this step · This confused me
7Challenges
Fix planHit in the cell below so rejected and missed swings emit no feedback, and turning reducedMotion on zeroes out shake and hit stop while keeping damage text.
local DEFAULT_HITSTOP = 0.06
local function planHit(outcome, damage, reducedMotion)
-- Bug: fires feedback even on miss/rejected, and ignores reducedMotion
return {
confirm = true,
hitStop = DEFAULT_HITSTOP,
shake = 0.45,
text = "-" .. tostring(damage),
}
end
local r1 = planHit("rejected", 34, false)
local r2 = planHit("hit", 34, true)
print(r1.confirm, r2.confirm, r2.shake, r2.text)
Level 1, Apprentice
Challenge
Fix planHit in hitstop-gate so only confirmed hits emit feedback and reducedMotion disables shake and hit stop without hiding damage numbers.
- Start from
- The game at milestone m14 (download)
- Check it here
- Run the code cell in the lesson view; the challenge completes when it passes. No Studio needed.
Done means
- Return confirm = false, hitStop = 0, shake = 0, text = nil for miss or rejected swings
- Set hitStop = 0 and shake = 0 when reducedMotion is true while keeping confirm = true and text = -34
- All four assertions in hitstop-gate pass
Hints
- Guard early with if outcome ~= "hit" or damage <= 0 then ... end.
- Use inline conditionals for hitStop and shake based on reducedMotion.
Solution
local DEFAULT_HITSTOP = 0.06
local function planHit(outcome, damage, reducedMotion)
if outcome ~= "hit" or damage <= 0 then
return { confirm = false, hitStop = 0, shake = 0, text = nil }
end
return {
confirm = true,
hitStop = if reducedMotion then 0 else DEFAULT_HITSTOP,
shake = if reducedMotion then 0 else 0.45,
text = "-" .. tostring(damage),
}
end
local r1 = planHit("rejected", 34, false)
local r2 = planHit("hit", 34, true)
print(r1.confirm, r2.confirm, r2.shake, r2.text)
Level 2, Builder
Challenge
Run a 150 ms latency and ReducedMotion combat audit in Studio Play and write down the five highest-impact feel improvements for Beacon Yard.
- Start from
- The game at milestone m14 (download)
Done means
- Test Beacon Yard combat in Studio with the Network Simulator (beta) at 75 ms inbound and 75 ms outbound latency
- Test with ReducedMotion off and then on in SettingsGui
- Record a 5-row feel audit covering anticipation, hit confirm clarity, miss contrast, audio repetition and reduced-motion readability
Hints
- Open Test > Device Simulator and set the latency under Network on its toolbar.
- Swing deliberately into empty air and into the drone to compare whether miss vs hit feels distinct.
Testing hit confirm and accessibility without guessing
Putting hit-ID deduplication, hit-stop clamping, reduced-motion suppression, shake decay and pitch spread into one pure planner proves that rejected swings stay silent and reduced-motion players still get clear hit confirmation.
Level 3, Professional
Challenge
Start from m14-ship in the game repo and implement the pure hit-confirm feedback planner in challenges/work/feel_rules.luau, then verify with game.ServerScriptService.RunGameTests:Invoke("game-feel", "game-feel-confirm").
- Start from
- The game at milestone m14 (download)
- Grade it
- In Studio, press Play, then run
game.ServerScriptService.RunGameTests:Invoke("game-feel", "game-feel-confirm")in the server command bar. Copy the pass code from Output.
Done means
- challenges/work/feel_rules.luau fires hit feedback once per confirmed hitId and never on miss, rejected or duplicate IDs
- Confirmed Drone hits plan 0.06 s hit stop and 0.45 shake; Crawler hits plan 0.3 shake; both format -34 damage text and layered clang
- reducedMotion sets hitStopSeconds and shakeAmplitude to 0 while preserving playConfirm, damageText and playLayeredClang
- shakeEnvelope decays exponentially and jitterPitch clamps unitRoll across [1 - spread, 1 + spread]
- RunGameTests:Invoke("game-feel", "game-feel-confirm") passes all 8 checks
Hints
- Track seen hit IDs in tracker.seen[result.hitId] = true right after confirming outcome == "hit" and damage > 0.
- In jitterPitch, clamp unitRoll to [0, 1] and compute basePitch * (1 + (u * 2 - 1) * spread).
Suppose a client listener is accidentally connected twice and receives the same confirmed hitId = 42 twice. With a seen table guard, what does this print?
local seen = {}
local fires = 0
local function onConfirm(hitId)
if seen[hitId] then return end
seen[hitId] = true
fires += 1
end
onConfirm(42)
onConfirm(42)
onConfirm(43)
print(fires)
Answer
2. Deduplicating by server hitId prevents double-stacked camera shakes and earsplitting doubled hit sounds.
Open this step in lesson mode · Link to this step · This confused me
8Recap
Retiring the analogy
You no longer need “a drum hit: raising the stick, striking the skin, letting the cymbal ring”. Combat feel splits local anticipation from server-confirmed impact. Every impact effect triggers once per confirmed hit id, never on a miss or rejected request, and suppresses camera shake and hit stop whenever Accessibility.reducedMotion() is true.
Recap
- Split combat into immediate local anticipation, server-confirmed impact and clean recovery.
- Fire hit confirm (60 ms local animation hit stop, damage numbers, layered clang and damped shake) strictly once per confirmed server hitId and never on misses or rejected swings.
- Respect Accessibility.reducedMotion() by dropping shake and hit stop to zero while keeping damage text, reduced sparks and audio confirmation clear.
- Layer impact audio with pitch jitter (Config.SFX_PITCH_SPREAD) so repeated hits stay punchy across long sessions.
Anticipation, impact and recovery in combat feel is a drum hit: raising the stick, striking the skin, letting the cymbal ring, until a real drummer always hits the drum in front of them; over a network, the client starts the swing immediately, while the server decides milliseconds later whether the raycast actually hit, so impact juice must wait for server confirmation.
Queued for review
- At m14-ship, why can a player swinging at a scrap crawler see sparks burst at the drone instead of the crawler?
- Put the events of one server-confirmed wrench hit in chronological order.
- A player swings at t = 1.00 s (hits Drone) and swings again at t = 1.25 s. SWING_GAP in CombatService.luau is 0.4 seconds. What does this print?
- Why must Beacon Yard's 60 ms hit stop pause only the attacker's local AnimationTrack instead of pausing DroneService on the server?
- Which techniques keep Beacon Yard's wrench hits crisp without causing ear fatigue over a 10-minute session?
- A player enables ReducedMotion in Beacon Yard's Settings menu and lands a wrench hit on the drone. What should they experience?
Open this step in lesson mode · Link to this step · This confused me