Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Mouse.Hit.p is not being set to BodyPosition.Position?

Asked by 8 years ago
local a = script.Parent.Parent.Parent:GetMouse()
script.Parent.Activated:connect(function(idk)
    local b = game.ServerStorage.Part:Clone()
    b.Parent = game.Workspace
    b.CFrame = CFrame.new(script.Parent.Handle.CFrame.p)
    b.BodyPosition.Position = Vector3.new(a.Hit.p)
end)

When I click, the BodyPosition inside of the clone is supposed to set it's position to the position of the mouse, but it keeps setting to 0, 0, 0 and the output doesn't say anything is wrong. Any help please?

Answer this question