Server and Client are placing blocks wrong

So the client places a block so if you lag your blocks arnt delayed to being placed, but the client is playing the blocks in the complete wrong spot

--client

game.ReplicatedStorage.Build:FireServer(SnapHRP1)


						-- THIS DOES THE EXACT SAME AS BEFOR

					
						local Block = game.ReplicatedStorage.Blocks.Block:Clone()

						Block.Parent = workspace
						Block.Position = Vector3.new(SnapHRP1.x, SnapHRP1.Y - (1.5), SnapHRP1.Z)
						Block.Size = Vector3.new(3,3,3)
						Block.CanCollide = false
						Block.Transparency = 0
						Block.HitBox.Position = SnapHRP1
						Block.HitBox.CanQuery = true
						Block.CanQuery = true
						Block.CanCollide = true
						Block.InnerHitbox.Position = SnapHRP1

-- server


	local Block = game.ReplicatedStorage.Blocks.Block:Clone()

	Block.Parent = workspace
	Block.Position = Vector3.new(SnapHRP.x, SnapHRP.Y - (1.5), SnapHRP.Z)
	Block.Size = Vector3.new(3,0,3)
	Block.CanCollide = false
	Block.Transparency = 0
	Block.HitBox.Position = SnapHRP
	Block.HitBox.CanQuery = true
	Block.CanQuery = true
	Block.CanCollide = true
	Block.InnerHitbox.Position = SnapHRP
	
	

1 Like

changed line of code to this

Block.Position = Vector3.new(MousePosX, MousePosY - 1.5, MousePosZ)

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