Character bugging after weld

Hello Roblox Dev Community,

Info
I have gotten a problem with my character.
So when I grab a stick, then a part will weld to my Character. But then my character stops rotating. I have tried fixing this by re-enabling the AutoRotate in the humanoid, but that’s not it.

video

Code
local serverStorage = game:GetService("ServerStorage")
local prefabs = serverStorage:WaitForChild("Prefabs")
local glowPrefab = prefabs:WaitForChild("Highlight")

local function Weld(part0, part1)
	local weld = Instance.new("WeldConstraint", part0)
	weld.Part0 = part0
	weld.Part1 = part1
	
	return weld
end

local character = plr.Character -- In the real script this is defined to the character that grabs the stick
local primaryPart = character.PrimaryPart
	
local glow = glowPrefab:Clone()
glow.Parent = character

local CF = Instance.new("Part")
CF.CFrame = CFrame.new(primaryPart.Position.X, primaryPart.Position.Y - 2.85, primaryPart.Position.Z)
CF.Orientation = Vector3.new(0, 0, 90)
	
glow:SetPrimaryPartCFrame(CF.CFrame)
	
Weld(glow.PrimaryPart, character.GroundCollider)

The problem
So basicly when I weld that part to my character’s primarypart it starts bugging as you can see in the video.

I really don’t know how to fix this problem. I would really love solutions from people so feel free to comment.

Cya!
:wave: :waffle:

1 Like

So it seems like because it’s welded on the part the character doesn’t rotate because it faces the front of the part. Instead of welding the character on the part, weld the part on the character.

The game looks fun btw lol :grin:

edit: It seems like you welded it on the character, but have you welded it on the HRP?

1 Like

Hey,

Thanks for responding!
When I weld it to the HRP it still does the same thing. It’s weird that I use the same way of welding the stick, but it just doesn’t works for the marker/highlight thing :confused:

Hey,

I have changed plans now. I’ll maybe do that highlight thing for a different update.
I think this looks good enough :slight_smile:

Picture

afbeelding

Yeah, that looks really good. I hope you find a solution for your problem soon enough!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.