Sorry for Google Translator
local player = game.Players.LocalPlayer
local charecter = player.Character
local mouse = player:GetMouse()
mouse.Button1Down:connect(function()
local stone = game.ReplicatedStorage.stone:Clone()
if mouse.Target ~= nil then
stone.Parent = workspace
stone.Position = Vector3.new(mouse.Target)
end
end)
What have I done wrong? if you remove the line
stone.Position = Vector3.new(mouse.Target)
, the code works well. According to my idea object "stone" should be created on the mouse coordinates

1 comment
I think Mouse.Target returns the object that the mouse is pointing at, not a Vector3 position