I’m trying to make a script that changes a dummy’s position depending on where your mouse is at
local button = script.Parent.TextButton
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local dummy = game.ReplicatedStorage:WaitForChild("Minigun"):Clone()
button.MouseButton1Up:Connect(function()
print("button pressed")
dummy.Parent = game.Workspace
mouse.TargetFilter = dummy
while true do
local pos = mouse.Hit.Position
dummy.HumanoidRootPart.Position = pos
wait()
end
end)
the problem is, changing the position of dummy’s humanoid root part does not move the entire body and I can’t think of an alternative way.