Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

My welding script isnt working. Character is turning, What is wrong?

Everytime the script plays my character turns sideways and stops moving.

local UIS = game:GetService("UserInputService")
local player = game.Players.LocalPlayer


UIS.InputBegan:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		local ball1 = Instance.new("Part", workspace)
		ball1.Anchored = true
		ball1.CanCollide = false
		ball1.BrickColor = BrickColor.Blue()
		ball1.Material = "Neon"
		ball1.Shape = "Ball"
		ball1.Size = Vector3.new(2,2,2)
		
		-- Connecting to Hand;
		
		local weld = Instance.new("Weld", ball1)
		weld.Part0 = player.Character:WaitForChild("LeftHand")
		weld.Part1 = ball1
		weld.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0)
	end
end)

1 answer

✓ Accepted answer

It's probably because of the ball1.Anchored (line 8) or the CFrame (line 20) or maybe both.

2 comments

0

Thx so much

0

Your welcome.

This discussion is preserved as it was. New answers, comments, and votes are closed.