Hello, I am a pretty new developer and I have been trying to use a click detector to instance a new part at the player position, but I couldn't find a way to get the position.
here is what I tried: the script is inside the click detector
script.Parent.MouseClick:Connect(function(plr)
local pos = plr.Character.Humanoid.Position
local fireBallIn = Instance.new("Part")
local fireBallOut = Instance.new("Part")
end)
but it's not working. it says in the error output that Position is not a valid member of Humanoid. thanks in advance and I am sorry if I wasn't very clear

1 comment
Torso is not a reliable way of finding the player's position, please use HumanoidRootPart.