I’m trying to make VR climbing similar to Edgeworks or Boneworks and I’ve done it before but this time my code refuses to work.
Here is my code if anyone can help and also a video
local Part = Instance.new("Part", Item)
Part.Name = "GrabPart"
Part.Anchored = false
Part.Transparency = 0
Part.CanCollide = false
Part.Color = Color3.fromRGB()
Part.Position = HitPos
local Attachment = Instance.new("Attachment", Part)
local Weld = Instance.new("WeldConstraint", Hand)
Weld.Name = "Weld"..Hand.Name
Weld.Part0 = Hand
Weld.Part1 = Item
local AlignPos = Instance.new("AlignPosition", Hand)
local AlignPos2 = Instance.new("AlignPosition", Part)
local Attach1 = Instance.new("Attachment", Part)
local Attach2 = Instance.new("Attachment", Hand)
AlignPos2.Name = "AlignPos2"..Hand.Name
AlignPos2.Responsiveness = 10
AlignPos2.Attachment0 = Attach1
AlignPos2.Attachment1 = Attach2
AlignPos.Name = "AlignPos"..Hand.Name
AlignPos.Attachment1 = Part.Attachment
AlignPos.Attachment0 = Player.Character.Legs.Attachment
AlignPos.Responsiveness = 20
--AlignPos.MaxForce = 10000
AlignPos.ReactionForceEnabled = true
Run = game:GetService("RunService").Heartbeat:Connect(function()
if Part ~= nil then
if Hand.Name == "LeftHandCollide" then
--Part.CFrame = CFrame.new(HitPos + Player.Character.LeftHand.Position)
--Part.CFrame = CFrame.new(Player.Character.LeftHand.Position.X * -1, Player.Character.LeftHand.Position.Y * -1, Player.Character.LeftHand.Position.Z * -1) + Hand.Position
Part.CFrame = CFrame.new(RealLeftCFrame.Position.X * -1, RealLeftCFrame.Position.Y * -1, RealLeftCFrame.Position.Z * -1) + Hand.Position
task.wait()
elseif Hand.Name == "RightHandCollide" then
Part.CFrame = CFrame.new(RealRightCFrame.Position.X * -1, RealRightCFrame.Position.Y * -1, RealRightCFrame.Position.Z * -1) + Hand.Position
task.wait()
end
end
end)
See how the locomotion ball in charge of the players position just goes straight to the part? i need it to go near the part