#Welding help

1 messages · Page 1 of 1 (latest)

heady remnant
#

weld = Instance.new("Weld")
weld.Parent = hrp
weld.Part0 = Character.HumanoidRootPart
weld.Part1 = EnemyHit.HRP
weld.C0 = CFrame.new(0, 0, -4)
weld.C1 = CFrame.Angles(0, math.rad(180), 0)

this is my line of code for welding two parts together whenn i have 2 players it outputs something different.
Like for player 1 it will put player 2 infront of him like its sup to but when its players 2 turn to use the move it places player
2 infrom of player 1 instead of whats sup to happen

real lance
#

At least put a bit more effort into the question. Like trying to form better sentences and articulate it better

heady remnant
#

its this or chat gpt dog

signal gazelleBOT
#

studio** You are now Level 3! **studio

real lance
dreamy fossil
heady remnant
# dreamy fossil I think what might help confusion is perhaps a video that shows us what the issu...

I found out that it was a simple welding issue due to network ownership so I was able to fix it by using weld constraint instead and by setting network ownership properly.

the original issue was that enemyhit.hrp will be seen as the part0 in the weld. so it would position player 1 in front of player 2.
instead of the other way around. thank you, but if a better solution or more optimal solution is available I would be happy to hear any corrections to this problem. Since I'm still figuring out the way Roblox Networks between client to client, instead of client to studio

dreamy fossil
heady remnant
#

its pretty messy but sure let me get a video as well

dreamy fossil
heady remnant
# dreamy fossil I just mean the updated weld portion

local enp = EnemyHit.HRP:GetNetworkOwner()
local weld
if EnemyHit.Humanoid.Health >0 then
EnemyHit.HRP:SetNetworkOwner(Player)
EnemyHit.Humanoid.PlatformStand = true
local targetPosition = hrp.Position + hrp.CFrame.LookVector * 4
local targetCFrame = CFrame.lookAt(targetPosition, hrp.Position)
EnemyHit.HRP.CFrame = targetCFrame
weld = Instance.new("WeldConstraint")
weld.Parent = hrp
weld.Part0 = Character.HumanoidRootPart
weld.Part1 = EnemyHit.HRP
end

dreamy fossil
heady remnant
#

no its in a module script

dreamy fossil
heady remnant
#

nope i ahve a localscript that gets the inputs then it sends it to a player serverside script that does all the stuff

dreamy fossil
heady remnant
# dreamy fossil Okay cool just checking. I'm just wondering why you'd need to change network ow...

oh i d ont really know if i need to change the network ownership as of right now as im just doing trial and error as nnow my weld works but its not allowing me to move my character properly like in this video player 1 is able to move around and drag player 2, but when i try it with player 2 i cant seem to move the characters around, so i was just messing around with network ownership to see if that was the problem
https://www.youtube.com/watch?v=GNP_i0ugvAI

dreamy fossil
heady remnant
heady remnant