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!