diff --git a/CLAUDE.md b/CLAUDE.md index 2348e53..192041b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -62,6 +62,63 @@ part.Parent = game.Workspace --- +## ๐Ÿšจ ์ค‘์š” ๊ฐœ๋ฐœ ๋…ธํŠธ (๋ฐ˜๋“œ์‹œ ์ˆ™์ง€!) + +### โŒ LocalScript ๋ฌผ๋ฆฌ ์—”์ง„ ์ œ์•ฝ์‚ฌํ•ญ + +**๋ฌธ์ œ**: LocalScript์—์„œ BodyVelocity/BodyGyro๋ฅผ ์ƒ์„ฑํ•˜๋ฉด ํด๋ผ์ด์–ธํŠธ์—์„œ๋งŒ ๋ณด์ด๊ณ  ์‹ค์ œ ๋ฌผ๋ฆฌ ์—”์ง„์— ์˜ํ–ฅ์„ ์ฃผ์ง€ ๋ชปํ•จ + +**์ฆ์ƒ**: +- Output ์ฐฝ์— "โœ… BodyVelocity ์ƒ์„ฑ" ๋ฉ”์‹œ์ง€๋Š” ๋‚˜์˜ค์ง€๋งŒ +- ์‹ค์ œ๋กœ `workspace.RaceCar1.Chassis:FindFirstChildOfClass("BodyVelocity")`๋Š” nil ๋ฐ˜ํ™˜ +- `bodyVelocity.Velocity` ์„ค์ •ํ•ด๋„ ์ฐจ๋Ÿ‰์ด ์›€์ง์ด์ง€ ์•Š์Œ +- ํ‚ค ์ž…๋ ฅ์€ ๊ฐ์ง€๋˜๊ณ  ์†๋„ ๊ณ„์‚ฐ์€ ์ •์ƒ์ด์ง€๋งŒ ์ด๋™ ์—†์Œ + +**์›์ธ**: +- LocalScript๋Š” ํด๋ผ์ด์–ธํŠธ ์ „์šฉ์ด๋ฏ€๋กœ ์„œ๋ฒ„์— ๋ฌผ๋ฆฌ ์˜ค๋ธŒ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•  ์ˆ˜ ์—†์Œ +- BodyVelocity/BodyGyro๋Š” ์„œ๋ฒ„์—์„œ๋งŒ ์ž‘๋™ํ•˜๋Š” ๋ฌผ๋ฆฌ ์—”์ง„ ์ปดํฌ๋„ŒํŠธ + +**ํ•ด๊ฒฐ์ฑ…**: +```lua +-- โŒ ์ž‘๋™ํ•˜์ง€ ์•Š์Œ (LocalScript) +local bodyVel = Instance.new("BodyVelocity") +bodyVel.Parent = chassis +bodyVel.Velocity = moveDirection -- ํšจ๊ณผ ์—†์Œ! + +-- โœ… ์˜ฌ๋ฐ”๋ฅธ ๋ฐฉ๋ฒ• (LocalScript) +chassis.AssemblyLinearVelocity = moveDirection -- ์ง์ ‘ ์„ค์ • +chassis.CFrame = chassis.CFrame * CFrame.Angles(0, rotation, 0) -- ํšŒ์ „ +``` + +**์ถ”๊ฐ€ ์ œ์•ฝ**: +- `SetNetworkOwner()` - LocalScript์—์„œ ํ˜ธ์ถœ ๋ถˆ๊ฐ€ (์„œ๋ฒ„ ์ „์šฉ API) +- `BodyGyro`, `BodyPosition`, `BodyForce` ๋“ฑ ๋ชจ๋“  Body* ๊ณ„์—ด ๋™์ผํ•œ ๋ฌธ์ œ + +### โœ… Roblox ์ตœ์‹  ๋ฌผ๋ฆฌ ์—”์ง„ ๊ถŒ์žฅ ์‚ฌํ•ญ + +**์ตœ์‹  ๋ฐฉ์‹**: AssemblyLinearVelocity/AssemblyAngularVelocity ์ง์ ‘ ์‚ฌ์šฉ +- LocalScript/Script ๋ชจ๋‘์—์„œ ์ž‘๋™ +- ๋” ๋น ๋ฅด๊ณ  ํšจ์œจ์  +- Body* ๊ณ„์—ด๋ณด๋‹ค ์˜ˆ์ธก ๊ฐ€๋Šฅ + +**์ฐธ๊ณ  ์ฝ”๋“œ**: +```lua +-- ์†๋„ ์„ค์ • +chassis.AssemblyLinearVelocity = chassis.CFrame.LookVector * speed + +-- ํšŒ์ „ +chassis.CFrame = chassis.CFrame * CFrame.Angles(0, math.rad(turnSpeed), 0) + +-- ๋ฌผ๋ฆฌ ์†์„ฑ ์กฐ์ • (์„ ํƒ์‚ฌํ•ญ) +chassis.CustomPhysicalProperties = PhysicalProperties.new( + 0.7, -- Density + 0.3, -- Friction + 0.5 -- Elasticity +) +``` + +--- + # ๐Ÿ“‹ ํ”„๋กœ์ ํŠธ ๊ฐœ์š” - **ํ”Œ๋žซํผ**: Roblox Studio diff --git a/CyberFormulaRacing.rbxl b/CyberFormulaRacing.rbxl index 621dcce..cc77488 100644 Binary files a/CyberFormulaRacing.rbxl and b/CyberFormulaRacing.rbxl differ diff --git a/run_claude.bat b/run_claude.bat new file mode 100644 index 0000000..29a2144 --- /dev/null +++ b/run_claude.bat @@ -0,0 +1 @@ +claude --dangerously-skip-permissions