I’m gonna open the scope of the full script now as its come to my attention that there might be other things goin on:
local TweenService = game:GetService("TweenService")
local ServerStorage = game:GetService("ServerStorage")
local WorldRoot = game:GetService("Workspace")
local tool = script.Parent
local event = tool:WaitForChild("bloxxerGrabEvent")
local hitbox = ServerStorage.Hitboxes.BloxxerGrabHitbox
local highlight = ServerStorage.Assets["Bloxxer Grab"].ArmGlow
local grabMotor = tool.GrabMotor
local allObbies = ServerStorage.Assets["Bloxxer Grab"].Obbies
local easyObbies = allObbies.Easy
--local mediumObbies = allObbies.Medium
--local hardObbies = allObbies.Hard
local obbyComplete = allObbies.ObbyComplete
local armGlowTweenInfo = TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.In,0,false,0)
local armGlowTweenInfo2 = TweenInfo.new(2.5,Enum.EasingStyle.Exponential,Enum.EasingDirection.InOut,0,false,0)
local function CreateObby(character:Model)
local humanoid:Humanoid = character:FindFirstChild("Humanoid")
local humanoidRootPart:BasePart = character:FindFirstChild("HumanoidRootPart")
local obbyLevel = humanoid:GetAttribute("BloxxerGrabObbyLevel")
local startPosition = CFrame.new(humanoidRootPart.Position.X,humanoidRootPart.Position.Y + 5000, humanoidRootPart.Position.Z)
local nextPosition = startPosition
local obbySelection = easyObbies:GetChildren()
local obbyCollection = Instance.new("Model")
obbyCollection.Name = "RandomlyGeneratedObby"
obbyCollection.WorldPivot = startPosition
obbyCollection.Parent = workspace
for i = 1, 3 + obbyLevel, 1 do
local selectedObby:Model = obbySelection[math.random(1,#obbySelection)]:Clone()
selectedObby:PivotTo(nextPosition)
selectedObby.Parent = obbyCollection
nextPosition = selectedObby.ObbyEnd.CFrame
end
local newObbyComplete = obbyComplete:Clone()
newObbyComplete.CFrame = nextPosition
newObbyComplete.Parent = obbyCollection
--humanoidRootPart:SetNetworkOwner(nil)
humanoidRootPart.CFrame = CFrame.new(startPosition.Position + Vector3.new(0,3.5,0))
--task.wait(1)
--humanoidRootPart:SetNetworkOwner(game.Players:GetPlayerFromCharacter(character))
end
local function EventCalled(player:Player,eventType:string)
local character = player.Character
local humanoid = character:FindFirstChild("Humanoid")
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
local rightArm = character:FindFirstChild("Right Arm")
if eventType == "StartGrab" then
humanoid.WalkSpeed = 2
humanoid.JumpHeight = 0
elseif eventType == "GrabCheck" then
local newHitbox = hitbox:Clone()
newHitbox.Parent = workspace
newHitbox.CFrame = humanoidRootPart.CFrame + (humanoidRootPart.CFrame.LookVector * 3.5)
local hitboxArray = WorldRoot:GetPartsInPart(newHitbox)
for i, part in pairs(hitboxArray) do
local enemyCharacter = part.Parent
local enemyHumanoid = enemyCharacter:FindFirstChild("Humanoid")
local enemyHumanoidRootPart = enemyCharacter:FindFirstChild("HumanoidRootPart")
local enemyTorso = enemyCharacter:FindFirstChild("Torso")
if enemyHumanoid and enemyHumanoid ~= humanoid then
local newPosition = humanoidRootPart.CFrame.Position + (humanoidRootPart.CFrame.LookVector * 3)
enemyHumanoid.AutoRotate = false
humanoidRootPart.Anchored = true
enemyHumanoid.PlatformStand = true
event:FireClient(player)
enemyHumanoidRootPart.CFrame = CFrame.new(newPosition,humanoidRootPart.CFrame.Position)
grabMotor.Part0 = rightArm
grabMotor.Part1 = enemyHumanoidRootPart
grabMotor.C0 = rightArm.RightGripAttachment.CFrame
grabMotor.C1 = enemyTorso.BodyFrontAttachment.CFrame * CFrame.Angles(-190.1,135.1,0):Inverse()
local newArmGlow = highlight:Clone()
local newGuyGlow = highlight:Clone()
local armGlowTween = TweenService:Create(newArmGlow,armGlowTweenInfo,{FillTransparency = 0})
local guyGlowTween = TweenService:Create(newGuyGlow,armGlowTweenInfo,{FillTransparency = 0})
newArmGlow.Parent = rightArm
newGuyGlow.Parent = enemyCharacter
armGlowTween:Play()
guyGlowTween:Play()
armGlowTween.Completed:Once(function()
newGuyGlow:Destroy()
grabMotor:Destroy()
grabMotor.Part0 = nil
grabMotor.Part1 = nil
enemyHumanoid.PlatformStand = false
enemyHumanoid.AutoRotate = true
if enemyHumanoid:GetAttribute("BloxxerGrabObbyLevel") == nil then
enemyHumanoid:SetAttribute("BloxxerGrabObbyLevel",0)
else
enemyHumanoid:SetAttribute("BloxxerGrabObbyLevel",enemyHumanoid:GetAttribute("BloxxerGrabObbyLevel") + 1)
end
CreateObby(enemyCharacter)
end)
break
end
end
newHitbox:Destroy()
elseif eventType == "GrabComplete" then
local newArmGlow = rightArm:FindFirstChild("ArmGlow")
local armGlowTween = TweenService:Create(newArmGlow,armGlowTweenInfo2,{FillTransparency = 1})
armGlowTween:Play()
armGlowTween.Completed:Once(function()
newArmGlow:Destroy()
end)
elseif eventType == "Finish" then
humanoidRootPart.Anchored = false
humanoid.WalkSpeed = 16
humanoid.JumpHeight = 7.2
end
end
event.OnServerEvent:Connect(EventCalled)
If I remove the motor6d code in EventCalled it works although I don’t understand why It doesn’t work with it, since you can actively see I disable it.
Removing the animation does nothing. Same goes for tweens. Anchoring doesn’t work, and network ownership works although it is janky and for me to be able to reassign ownership I have to wait for some reason, which I don’t want to do.
I have been able to change other HRM Cframes in the past with other abilities, but I don’t understand what’s different here other than the Motor6D, which I presume is the culprit now, but I don’t know an effective way to fix that. Just to make it clear as well, the motor6d isn’t actually animated, it’s just there to connect the arm to the victims torso to make a good looking grab.