Mouse Raycasting  - Tower Defense Tutorial #5 @GnomeCode
Mouse Raycasting  - Tower Defense Tutorial #5  @GnomeCode
Uploaded December 2021 | Updated September 2026, 3 weeks ago
💾 Want the full scripts from this tutorial? 👉 gnomecode.com/tutorials/tower-defense

💡 Want more game dev content + early access to videos?
👉 gnomecode.com/academy

This episode lays the groundwork ready for us to start working on our tower placement. In this episode we learn how to detect the position of the mouse, create a ray, detect what it hits and paint the town red!

TIMESTAMPS
0:00 Intro
0:30 Detecting the mouse position
3:50 Getting mouse ray
6:00 Making raycasts
8:06 Using RunService
10:35 Interacting on click
14:30 Outro

S O C I A L S
🧙‍♂️ WEBSITE gnomecode.com
🔔 DISCORD discord.gg/utqq7zM
🐦X twitter.com/gnomecodeRBLX
🤖 ROBLOX roblox.com/users/18799320/profile

B U S I N E S S - E N Q U I R I E S
📧 gnome@gnomecode.com
Mouse Raycasting  - Tower Defense Tutorial #5How to hack #robloxstudioBuildings & Items - Dead Rails Tutorial #7Base Health  - Tower Defense Tutorial #8Making Euro Truck Simulator in Roblox #shortsTarget Modes - Tower Defense Tutorial #15FINISHING The Football Game  - Learn To Script #13Click & Drag Objects - Dead Rails Tutorial #4Item Respawns & Multiplayer Tweaks - Doors Tutorial #14What is a CFrame? #robloxstudioMaking Rush Monster AI - Doors Tutorial #7Enemy Ragdolls - Dead Rails Tutorial #11
GnomeCode |

Mouse Raycasting - Tower Defense Tutorial #5

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER