Weld accuracy significantly worse on client [Repo file]

I have a scope, its welded together nicely.
When I put it in ReplicatedStorage and start a server with 1 client, then the client welds will not have the exact same cframe as original.
The server have the correct one but the client has a very distorted one.

This is the difference between the scope on the server and the client:
WeldIssueFound.png

This repo file does not run any scripts, its just a model in ReplicatedStorage.
I’ll give repo-file to all staff workers but can’t post it publicly since it’s an important asset to my game that I don’t want to share with everybody.

This pun is significantly worse than your average pun.

2 Likes

Just some quick sanitary checks that may or may not be related,

Is your model welded before putting it in workspace? Do you throw it in workspace before welding it? Are you welding it at runtime or is it welded before the game even starts?

If none of those work, PM me a repro because I do similar stuff all of the time :stuck_out_tongue:

It might have to do with mesh offsets or weld ordering. Anyways, repro file?

I did manage to reproduce this with your repro.

I redid the welds and it seemed to fix the issue. You might have had some really weird matrices set in your C0 or C1 properties.

This is the player’s view using my remade welds. Does this look correct?

Get a better weld script, like this one:

local function weld(i,b)
	local weld1 = Instance.new("Weld") 
	weld1.Name = b.Name
	weld1.Part0 = i
	weld1.Part1 = b
	weld1.C1 = b.CFrame:inverse()*i.CFrame
	weld1.Parent = i
end 
6 Likes

Might be worth mentioning what plugin you use (or whatever you did) to mess up the matrices so people know to avoid it.

I used the welding code you sent me and it works now.
I would still claim that it’s partially a roblox issue since the server and client doesnt have the exact same info…

Heres the code that fixed it (credits to @AbstractAlex)

local w = Instance.new(“Weld”)
w.C1 = v.CFrame:toObjectSpace(base.CFrame)
w.Part0 = base
w.Part1 = v
w.Parent = base

I used my own weld plugin (https://www.roblox.com/Welder-item?id=263025420) that used some really old ugly welding code. I’v used that code forever without issue.

Eitherway now the plugin is updated and uses the code shown above.
Thanks alot everyone for your quick help!

I spent whole yesterday trying to solve this :stuck_out_tongue:

I’ve also learned that welding parts closest to the world origin (0,0,0 position) seems to work best. I had issues where welding my airplanes far away ended up with offset parts. Welding them in the center of the map and then moving them fixed that. Probably precision error stuff.

1 Like

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