Here is my script, I don't know what is up.
local Player = game.Players.LocalPlayer local Character = Player.Character local KeyBind = "u" local Mouse = Player:GetMouse() function FollowMouse() local Target = script.Target:Clone() Target.Parent = Character Target.Position.X = Vector3.new(Mouse.X,Target.Position.Y,Target.Position.Z) end Mouse.KeyDown:Connect(function(Key) if Key == KeyBind then FollowMouse() end end)
(Fixed) By redoing the variable to Mouse.hit.p instead of Mouse.x it fixed it!
Correct me if I am wrong, but I am pretty sure you need to define what X is to make it work. there isn't a place where you defined it