How do I make this work? it won't go to where the mouse clicked halp but it does place it
local bin = script.Parent
bin.Selected:connect(function(Mouse)
Mouse.Button1Down:connect(function()
local xorgin = Mouse.Origin.x
local yorgin = Mouse.Origin.y
local player = game.Players.LocalPlayer
Instance.new('Part', game.Workspace)
game.Workspace.Part.Transparency = 1
game.Workspace.Part.Name = player.Name..'FigurePart'
game.Workspace[player.Name..'FigurePart'].Position.x = xorgin
end)
end) |