Hi all!
Im using this script I clobbered together by looking at Mouse on the wiki and some stuff from here. I havent really used this before so I'm not even sure if this is really correct but I cant print Pos from here.
local Players = game:GetService("Players") local Player = Players.LocalPlayer local Mouse = Player:GetMouse() local Pos = Vector3.new(Mouse.Hit.Position()) print(Pos)
I'm trying to get a mouse position, then convert it so a NPC can move to it. I may just be extremely dumb. I'm newer to scripting so please go easy on me.
Apologies, it seems I misunderstood again. Here is some code.
local Pos = nil local Mouse = game.Players.LocalPlayer:GetMouse() local function check() Pos = Mouse.Hit.Position print(Pos) end -- while true do -- check() -- wait(0.1) -- Delete the comments if you want to test if this works. -- end