Position problems

Hello, I recently tried to make a simple tool that spawns a part to wherever I activate it on. But it’s only spawning the parts on my spawn point. How can I fix this? (Sorry for my grammar)

Here’s the code:

local a = script.Parent

a.Activated:Connect(function()

local b = script.Parent.Handle.Position
local c = Instance.new("Part")
c.Parent = game.Workspace
c.Position =  Vector3.new(b)	
print(b)

end)

I’m new to scripting so sorry if this wastes your time.

You are creating a Vector3 with another Vector3 and id do workspace instead of game.Workspace
so you would do:

local b = script.Parent.Handle.Position
local c = Instance.new("Part")
c.Parent = workspace
c.Position = b	
print(b)
2 Likes