I'm quite new to scripting in Lua and i was wondering how to get the position of LocalPlayer. My current script is:
local model = game.Workspace.Carlel
local position = game.Players.LocalPlayer.Character.Torso.Position
function onClicked()
local a = model:clone()
a.Parent = game.Workspace
wait()
a:MakeJoints()
wait()
a:MoveTo(position + Vector3.new(0,0,10))
end
script.Parent.MouseButton1Click:connect(onClicked)
I'm trying to make a car spawn near the player when the button is clicked. I've looked everywhere.

1 comment
Please accept my answer, it'll mark the question as done.